Re: [GENERAL] A possible use case for: "INSERT .. ON CONFLICT DO SELECT [FOR ..]"

2017-11-05 Thread Marko Tiikkaja
On Sat, Nov 4, 2017 at 6:41 PM, Marc-Olaf Jaschke wrote: > Perhaps I misunderstand the discussion but would "INSERT .. ON CONFLICT DO > SELECT [FOR ..]" not provide a solution for the following use case? > > [ .. ] > > That works. But it is a bit inconvenient to write the pseudo

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-12 Thread Marko Kreen
of resultset but that seems like bad idea. LIMIT N or FETCH N are better for such task. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-12 Thread Marko Kreen
On Wed, Mar 12, 2014 at 10:57:03AM +, matshyeq wrote: On Wed, Mar 12, 2014 at 9:30 AM, Marko Kreen mark...@gmail.com wrote: This option would not make sense as you are not fetching anything, full resultset is being streamed from server over TCP connection. Well, I don't know what

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-10 Thread Marko Kreen
() does not do additional roudtrips, it loads rows from libpq internal buffer. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Monitoring number of backends

2013-10-23 Thread Marko Kreen
, otherwise you won't get much win from pooling. So Postgres max_connections should be indeed = 3*90 for you. And you can limit server connection via server_idle_timeout. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] how _not_ to log?

2013-07-27 Thread Marko Kreen
you can use them to log in, without knowing the original password. And the encryption is single md5() so the actual password is relatively easy to crack too. So avoiding logging them is good idea. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] don't i need a -modules package for londiste3?

2013-04-29 Thread Marko Kreen
, but there are no 'modules' packages. Don't i need one anymore? (hope this is not off-topic for the list) It's renamed to postgresql-X.Y-pgq3. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] in C trigger function find out if column is part of primary key

2013-04-01 Thread Marko Kreen
unrelated features, but basics are in find_table_info() which loads cached data and relcache_reset_cb() which invalidates. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Recovering from an exception

2013-01-01 Thread Marko Tiikkaja
clean up after an exception? The attached code tries to imitate what the PLs are doing, but it's not working. :-( Regards, Marko Tiikkaja #include stdio.h #include stdarg.h #include unistd.h #include errno.h #include string.h #include limits.h #include sys/types.h #include sys/socket.h #include

Re: [GENERAL] Recovering from an exception

2013-01-01 Thread Marko Tiikkaja
the surround SPI context, or why it assumes it's a good idea. Regards, Marko Tiikkaja -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Recovering from an exception

2013-01-01 Thread Marko Tiikkaja
, and everything appears to be working correctly. Regards, Marko Tiikkaja -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Plproxy with returns table() make PG segfault

2012-11-17 Thread Marko Kreen
On Fri, Nov 16, 2012 at 11:09 AM, Sébastien Lardière slardi...@hi-media.com wrote: On 11/15/2012 08:40 PM, Cédric Villemain wrote: top post: this looks like a plproxy bug (no ?), I've added Marko in CC. Yes, it is, i think … Thanks, fixed in git. Fix will be in 2.5 release. -- marko

Re: [GENERAL] Comparing txid_current() to xmin

2012-11-08 Thread Marko Kreen
that in comparision instead xmin/xmax. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-08 Thread Marko Kreen
MYSITE_pgbouncer Because of data sanitizing I cannot see actual problem, but few hints: - Don't give one username several times (pgbouncer uses just one of them) - Usernames are case-sensitive - Username max length is 63 chars -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-08 Thread Marko Kreen
On Sat, Oct 6, 2012 at 5:24 AM, Adrian Klaver adrian.kla...@gmail.com wrote: One thing I see above: http://pgbouncer.projects.postgresql.org/doc/config.html \* acts as fallback database Notice the backslash. The backslash is asciidoc/docbook accident, it should be plain * there. -- marko

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-09 Thread Marko Kreen
, but local call may not) - Not good idea if high transaction rate is expected (Adds network latency to each call, many new connections) 2) Use PgQ ( http://wiki.postgresql.org/wiki/PGQ_Tutorial ) + Good for high loads as it does batch-processing + Transactional - Asynchronous -- marko -- Sent

Re: [GENERAL] Anonymized database dumps

2012-03-19 Thread Marko Kreen
-looking you need custom mapping logic. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
On Tue, Jan 31, 2012 at 08:17:57AM +1100, Chris Angelico wrote: On Tue, Jan 31, 2012 at 4:12 AM, Marko Kreen mark...@gmail.com wrote: On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico ros...@gmail.com wrote: http://wiki.postgresql.org/wiki/PGQ_Tutorial PGQ looks promising, but I can't afford

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Marko Kreen
://pgbouncer.projects.postgresql.org/doc/usage.html Statement pooling throws error on open transaction. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] segfault with plproxy

2011-12-20 Thread Marko Kreen
On Mon, Dec 19, 2011 at 01:05:20PM +0100, Filip Rembiałkowski wrote: W dniu 19 grudnia 2011 10:39 użytkownik Marko Kreen mark...@gmail.com napisał: On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: Following scrip causes segmentation fault. Any ideas why / how to diagnose

Re: [GENERAL] segfault with plproxy

2011-12-19 Thread Marko Kreen
to pick different target function. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Marko Kreen
the vague error no working server connection? no working connection means that client logged into pgbouncer successfully, but pgbouncer cannot log into server. Please look into Postrgres log file for details. If you see no failures there, you have wrong connect string in pgbouncer.ini. -- marko

Re: [GENERAL] UTF-8 for bytea

2011-11-03 Thread Marko Kreen
-quoted. See the docs for details. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
of db-side prepared statements by adding option PDO::ATTR_EMULATE_PREPARES = true -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
logic... Maybe I should try session mode of pgbouncer again, now that I've got rid of the persistent PHP connections? You could, but try to turn off prepared statements in PDO first. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] finding bogus UTF-8

2011-02-15 Thread Marko Kreen
a query to find such values? CREATE OR REPLACE FUNCTION is_utf8(text) RETURNS bool AS $$ try: args[0].decode('utf8') return True except UnicodeDecodeError: return False $$ LANGUAGE plpythonu STRICT; -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-03 Thread Marko Kreen
in non-standard location, you need to set PYTHONPATH in postgres server environment to point to there, otherwise PL won't see it. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-02 Thread Marko Kreen
not do signing, sorry. But you can do it with PL/Python or PL/Perl and their wrapper libraries around OpenSSL (or any other crypto library). -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-01 Thread Marko Kreen
/YLCej59gZFFkvcCudweNAT4qHvVqWsOtFCf9kE4q92UIv1JcwSDU= This hash has 172 chars Does someone know where is my problem? Is there other way to implement?  or is it simply impossible?? These two operations are not equivalent. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-06-01 Thread Marko Tiikkaja
of the concurrency issue of write-able CTE's. The concern, as I understand it, has to do with modifications to the current snapshot. I'm sure someone who knows the code better can go into more detail. Marko? There were some issues with the previous design, but they will all be gone if it ever gets

Re: [GENERAL] pgp encryption functions

2009-11-09 Thread Marko Kreen
is empty... - this message may also appear if the passphrase for secret key is wrong. [this needs fixing] - make sure the secret key really corresponds to public key If none of these fix your problem, please send repeatable test-case (with temp key). -- marko -- Sent via pgsql-general mailing

Re: [GENERAL] Absolute value of intervals

2009-10-30 Thread Marko Kreen
that positive or negative seems mighty arbitrary. If I can add it to a timestamp and get a deterministic result, then we already have decided how to interpret the arbitrariness. Might as well be consistent then. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Absolute value of intervals

2009-10-30 Thread Marko Kreen
On 10/30/09, Sam Mason s...@samason.me.uk wrote: On Fri, Oct 30, 2009 at 01:45:24PM +0200, Marko Kreen wrote: On 10/30/09, Tom Lane t...@sss.pgh.pa.us wrote: That was the point of my '1 day -25 hours' example. Whether you consider that positive or negative seems mighty arbitrary

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
running. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Marko Kreen wrote: On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: You need to recompile your module. We recompile the module automatically when a new postgres cluster gets

[GENERAL] A question about inheritance and sequence

2009-06-24 Thread Marko Pahić
for help. Regards, Marko Pahić

Re: [GENERAL] A question about inheritance and sequence

2009-06-24 Thread Marko Pahić
Triggers are generally more robust. Quick example: NEW.noteid := SELECT 1+ COALESCE( (SELECT noteid FROM Notes WHERE userkey=NEW.userkey ORDER BY noteid DESC LIMIT 1), 0 ); Can you please write me the whole trigger? I've been reading the manual for an hour and I have no idea in where to apply

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
. It is built quite similarly to what you are planning - periodic snapshots and then queries on txids to get the data. -- marko [1] http://www.postgresql.org/docs/8.3/static/functions-info.html#FUNCTIONS-TXID-SNAPSHOT [2] http://wiki.postgresql.org/wiki/Skytools -- Sent via pgsql-general

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Brett Henderson br...@bretth.com wrote: Marko Kreen wrote: 4-byte xids on btree may create data corruption. Can you be more specific on this? I'm aware of xid being an unsigned integer which means we need to deal with the cast resulting in negative numbers. This means we

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
? -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos zerebub...@gmail.com wrote: On Thu, Jun 11, 2009 at 2:48 PM, Marko Kreenmark...@gmail.com wrote: On 6/11/09, Matt Amos zerebub...@gmail.com wrote: On Thu, Jun 11, 2009 at 1:13 PM, Brett Hendersonbr...@bretth.com wrote: See pgq.batch_event_sql() function

Re: [GENERAL] [Plproxy-users] Two-phase commmit, plpgsql and plproxy

2009-02-18 Thread Marko Kreen
note there are no plans to get it 2PC with the local surrounding TX. This seems like overkill... Anyway - ATM I'm still some time inactive on plproxy front. If someone wants to take stab on experimenting with such stuff, please go ahead... -- marko -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Feature request dblink: Security issue - dblink user+password parameters must be optional

2009-01-28 Thread Marko Kreen
you can use wrapper function around dblink that constructs per-user connect string. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Marko Kreen
if the array gets hundreds of items long? Yes, array works fine. And if it's long, then let it be long... -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Shared object libpq.so.3 not found

2008-07-31 Thread marko
On Jul 31, 1:34 am, [EMAIL PROTECTED] (Tom Lane) wrote: marko [EMAIL PROTECTED] writes: I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I get this error after 'make test': #     Error:  Can't load '/usr

Re: [GENERAL] Shared object libpq.so.3 not found

2008-07-31 Thread marko
On Jul 31, 1:34 am, [EMAIL PROTECTED] (Tom Lane) wrote: marko [EMAIL PROTECTED] writes: I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with Perl v5.8.8.  I'm trying to test DBD-Pg-2.8.7 after compilation and I get this error after 'make test': #     Error:  Can't load '/usr

[GENERAL] Shared object libpq.so.3 not found

2008-07-30 Thread marko
I'm running FreeBSD 6.2 and I have Postgresql 8.2.4 installed with Perl v5.8.8. I'm trying to test DBD-Pg-2.8.7 after compilation and I get this error after 'make test': PGINITDB=/usr/local/pgsql/bin/initdb PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib',

Re: [GENERAL] Trigger to run @ connection time?

2008-03-14 Thread Marko Kreen
On 3/14/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: On Thu, Mar 13, 2008 at 2:18 PM, Marko Kreen [EMAIL PROTECTED] wrote: On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: An application which uses tsearch2 ('SELECT set_curdict() / set_curcfg()' being called upon session start

Re: [GENERAL] Trigger to run @ connection time?

2008-03-14 Thread Marko Kreen
On 3/14/08, Erik Jones [EMAIL PROTECTED] wrote: On Mar 14, 2008, at 7:17 AM, Marko Kreen wrote: To put it to core Postgres, it needs to be conceptually sane first, without needing ugly workarounds to avoid it bringing whole db down. I can see ATM only few ways: - Applies

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Marko Kreen
() every time. ON CONNECT trigger would solve that neatly! Hm. It seems to make more sense to implement connect-time hook directly in pgbouncer. -- marko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
; in remote db, which makes the exercise quite pointess IMHO. I obviously would recommend pl/proxy for such task, but that would expect you are able to write your queries. If you are in situation where you don't control the queries, then plproxy quite likely is not use. -- marko

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
there is nothing in the docs that says it shouldn't be working... 4) I am not able to rewrite my queries. Have fun then. -- marko ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
partitions, right? Yes, effect should be same. -- marko ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-28 Thread Marko Kreen
we have a plan to update string hash in 8.4 to fastest available (Jenkins lookup3). Maybe we should update integer hash too then to the best: http://www.cris.com/~Ttwang/tech/inthash.htm (32 bit Mix Functions is the one). -- marko ---(end of broadcast

Re: [GENERAL] Postgresql + digital signature

2008-01-23 Thread Marko Kreen
module for sign+verify - I'd guess that both plpythonu and plperlu should have those. -- marko ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Postgresql + digital signature

2008-01-23 Thread Marko Kreen
and also give ability to do smooth schema upgrades without applications noticing. -- marko ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] plpythonu

2008-01-18 Thread Marko Kreen
previously work was done on vX.Y. Without upstream developers cooperation this has been too painful. So the interesting thing in the posting is not that he succeeded locking Python down, but that he is pushing the patch to core. -- marko ---(end of broadcast

Re: [GENERAL] How to safely compare transaction id?

2008-01-12 Thread Marko Kreen
of that record, and used to compare with txid returned by FUNCTIONS-TXID-SNAPSHOT? No, it is just physical location of the row. -- marko ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail

Re: [GENERAL] How to safely compare transaction id?

2008-01-11 Thread Marko Kreen
-- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Feature request: NOTIFY enhancement

2008-01-04 Thread Marko Kreen
as well go straight to something full-fledged like pgq... Sligtly better link for PgQ: https://developer.skype.com/SkypeGarage/DbProjects/SkyTools#head-65d9b2775e38524d7ce3f3940700cdf924480bc6 -- marko ---(end of broadcast)--- TIP 5: don't forget

Re: [GENERAL] Feature request: NOTIFY enhancement

2008-01-04 Thread Marko Kreen
* from pgq.finish_batch(); To publish events to PgQ you need 1 SQL function: SELECT * from pgq.insert_event(); How do those 4 queries make your client fat ? -- marko ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ

Re: [GENERAL] accessing multiple databases using dblink

2007-12-13 Thread Marko Kreen
, but in that case I would need a row resource, while dblink give back a table resource... Is it possible to resolve this inside the databse? Thanks a lot... This seems to be appropriate task for pl/proxy: https://developer.skype.com/SkypeGarage/DbProjects/PlProxy -- marko

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-05 Thread Marko Kreen
happen. -- marko ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
pass on your box or not. If not please send 'regression.diffs' to me. I'm interested what exactly fails. -- marko ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
public key and pgpdump output of private key, if should not inlude any secret info. (http://www.mew.org/~kazu/proj/pgpdump/) I really like to understand whats going on... -- marko ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-11-30 Thread Marko Kreen
either you have found a bug in pgcrypto which is dependant on public key algo/OS/CPU/OpenSSL/compiler details or you have some mistake on your own (eg, your private and public key does not match). So I need more details to understand your problem. -- marko ---(end

Re: [GENERAL] md5() sorting

2007-11-07 Thread Marko Kreen
the md5sum as a bytea instead of text and then sort, if that would solve it simply. Along the lines of ... ORDER BY decode(md5('...'), 'hex'); ? I knew I'd ask here ;-) Maybe using digest(.., 'md5') function from pgcrypto would be better? It gives bytea immidiately. -- marko

Re: [GENERAL] pgcrypto: is an IV needed with pgp_sym_encrypt()?

2007-09-18 Thread Marko Kreen
() function with crypt-blowfish hash, which is couple of magnitudes stronger that MD5/SHA* for that purpose. I'd welcome any comments or recommendations from others that have implemented something similar. -- marko ---(end of broadcast)--- TIP 9

Re: [GENERAL] Sthange things happen: SkyTools pgbouncer is NOT a balancer

2007-09-11 Thread Marko Kreen
, no balancing optimization at all. To use less connections on server side. -- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do

Re: [GENERAL] Connection pooling

2007-09-07 Thread Marko Kreen
On 9/7/07, Max Zorloff [EMAIL PROTECTED] wrote: On Fri, 07 Sep 2007 10:58:36 +0400, Marko Kreen [EMAIL PROTECTED] wrote: The pgpool (I tried 3.1, 3.4 and pgpool-II 1.2) works fine but has the following problem - after some time it just hangs, and if I try to connect to it with psql it just

Re: [GENERAL] Connection pooling

2007-09-07 Thread Marko Kreen
into productions config, so the code should be fixed still... -- marko ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-30 Thread Marko Kreen
may not sound like a big problem, but the scary thing is - the last VACUUM's memory request may succeed and that means following queries start failing and that is big problem. -- marko ---(end of broadcast)--- TIP 1: if posting/reading through Usenet

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-30 Thread Marko Kreen
On 8/30/07, Tom Lane [EMAIL PROTECTED] wrote: Marko Kreen [EMAIL PROTECTED] writes: Note that it's much better to err on the smaller values. Extra index pass is really no problem. I beg to differ ... Well, if Postgres tries to cut down passes by using max memory then admin is forced

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-28 Thread Marko Kreen
maint_mem before start, whatever the actual size of the table. Fix was to put set maint_mem=32M before small vacuums and serialize some of them. -- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire

Re: [GENERAL] Geographic High-Availability/Replication

2007-08-27 Thread Marko Kreen
. Asyncronous replication will break down too. -- marko ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
module. Due to historical accident is has bad name which hints at encryption, actually its only purpose is to hash passwords. Read more in pgcrypto doc. -- marko ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Brian Mathis [EMAIL PROTECTED] wrote: On 6/5/07, Marko Kreen [EMAIL PROTECTED] wrote: Both md5 and sha1 are bad for passwords, no salt and easy to bruteforce - due to the tiny amount of data in passwords. Proper ways is to use crypt() function from pgcrypto module. Due

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Marko Kreen [EMAIL PROTECTED] wrote: both md5 and sha1 are actually easier to bruteforce than the old DES-based crypt. If this statement seems weird - the problem is the speed. MD5 and SHA1 are just faster algorithms than des-crypt. And there's nothing wrong with fast general

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
that each hash needs to be attacked separately. In case of attacking one hash the salt does not matter, only the algorithm counts then. In that case as i said, event salted md5 is weaker than des-crypt. -- marko ---(end of broadcast)--- TIP 1: if posting

Re: Creditcard Number Security was Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
are encrypted with it, later actual billing happens in separate, highly secured system that has corresponding private key available to decrypt the data. -- marko ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http

[GENERAL] SQL - update table problem...

2006-11-13 Thread Marko Rihtar
Hi, i'm trying to make update on multiple tables but don't know how. is something like this posible with postgresql? update table1 join table2 on (table1.id=table2.t1) join table3 on (table2.id=table3.t2) set table1.name='test', table2.sum=table1.x+table2.y, table3.cell='123456789' where

[GENERAL] system tables...

2006-11-13 Thread Marko Rihtar
Hi, is there a system table in which postgres stores all data about newly created database? together with database objects, tables, columns, functions etc. thanks _ FREE pop-up blocking with the new MSN Toolbar - get it now!

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-10 Thread Marko Kreen
-1 is really a fix of the original SHA (sometimes referred to as SHA-0). -- marko ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
to recompile PostgreSQL. Don't try to use non-OpenSSL pgcrypto with OpenSSL PostgreSQL, it will crash due to symbol conflict. Another variant is to try to compile separate OpenSSL 0.9.8 and compile PostgreSQL against that. So you don't need to upgrade system OpenSSL. -- marko

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
be self-compiled pgcrypto, that would work with stock PostgreSQL. As the conflict happens with only (new) SHA2 functions, I can prepare a patch for symbol conflict, would that be satisfactory for you? -- marko ---(end of broadcast)--- TIP 9

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer [EMAIL PROTECTED] wrote: On 5/9/06, Marko Kreen [EMAIL PROTECTED] wrote: The fact that Fedora pgcrypto is linked with OpenSSL that does not support SHA256 is not a bug, just a fact. It's not Fedora only, same problem with Gentoo/portage. I think it's problem for all

Re: [GENERAL] Performance Killer 'IN' ?

2006-04-03 Thread Marko Kreen
On 4/3/06, Kai Hessing [EMAIL PROTECTED] wrote: Marko Kreen wrote: Just a shot in the dark: does the plan stay the same, when you remove the ' AND status -1' ? No difference: I skipped the 'AND status -1' and have the following results... Ok. Thanks. I once had similar query

Re: [GENERAL] Performance Killer 'IN' ?

2006-03-31 Thread Marko Kreen
: does the plan stay the same, when you remove the ' AND status -1' ? -- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do

Re: [GENERAL] Fixing up a corrupted toast table

2006-03-09 Thread Marko Kreen
there and detect them later. (As I cannot query 'what table row has toast_oid') -- marko ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Oracle purchases Sleepycat - is this the other

2006-02-14 Thread Marko Kreen
On 2/14/06, Dan Sugalski [EMAIL PROTECTED] wrote: Zend isn't, last time I looked (which, granted, was ages ago), needed to run PHP, but it may be now. I guess you are thinking about Zend - PHP Optimizer not Zend - PHP Core. -- marko ---(end of broadcast

Re: [GENERAL] Postgres 8.1.2, Java, JDO, and case sensitivity woes

2006-01-28 Thread Marko Kreen
-- marko ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [GENERAL] xmin system column

2006-01-27 Thread Marko Kreen
fine. Btw it uses TopTransactionId, so subtransactions should not be problem. -- marko ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Page-Level Encryption

2006-01-20 Thread Marko Kreen
operation. -- marko ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Page-Level Encryption

2006-01-20 Thread Marko Kreen
to create keys externally. You could build something on it. -- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Why is create function bringing down the Backend server?

2005-12-23 Thread Marko Kreen
On 12/23/05, Carlos Moreno [EMAIL PROTECTED] wrote: Marko Kreen wrote: On 12/22/05, Carlos Moreno [EMAIL PROTECTED] wrote: The problem is, when I execute the SQL statement: create or replace function sha1 ; for the second time (i.e., after making modifications and recompiling

Re: [GENERAL] Why is create function bringing down the Backend server?

2005-12-22 Thread Marko Kreen
they are included. Ofcourse, that is no fun. If you want to hack, you could try adding SHA224 to the SHA2 implementation in 8.1. There are currently only SHA256/384/512 hashes implemented. (AFAIR it is basically truncated SHA256 but with different init vector) -- marko ---(end

Re: [GENERAL] Quick hack: permissions generator

2005-12-13 Thread Marko Kreen
On Mon, Dec 12, 2005 at 09:36:27PM -0600, Jim C. Nasby wrote: On Mon, Dec 12, 2005 at 02:38:57PM +0200, Marko Kreen wrote: I needed to re-set all permissions on a database as the database access philosophy changed. But as it had a lot of tables, I was losing overview very quick

[GENERAL] Quick hack: permissions generator

2005-12-12 Thread Marko Kreen
! # no grant will be generated -- marko #! /usr/bin/env python Generator for PostgreSQL permissions. ConfigParser docs: http://docs.python.org/lib/module-ConfigParser.html Example: [DEFAULT] users = user1, user2 # users

Re: [GENERAL] Question about 8.1 release news

2005-11-07 Thread Marko Kreen
'... -- marko ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

  1   2   >