[BUGS] BUG advisory_lock

2008-06-19 Thread Eugen.Konkov
DECLARE varUnlocked boolean; BEGIN varUnlocked:= pg_try_advisory_lock( 783264760123456 ); -- Try to lock function IF not varUnlocked THEN return NULL; END IF; -- exit if locking is unsucessfull WRONG QUERY HERE WHICH INTERRUPT EXECUTION varUnlocked:= pg_advisory_unlock( 783264760123456 ); -- un

Re: [BUGS] BUG #4116: Cannot create tablespace: could not set permissions on directory

2008-06-19 Thread Graham Leggett
Tom Lane wrote: This code makes the incorrect assumption that the platform will allow the postgres user to set the permissions using chmod. Is this something we should do anything about? IMHO, no. The reason for actually doing the chmod is to verify that we own the directory. If it fails,

Re: [BUGS] BUG advisory_lock

2008-06-19 Thread Tom Lane
<[EMAIL PROTECTED]> writes: > EXPECTED: Pg must unlock if function execution failed This is not a bug; it is the intended and documented behavior of advisory locks. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your

Re: [BUGS] BUG advisory_lock

2008-06-19 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > DECLARE > varUnlocked boolean; > BEGIN > varUnlocked:= pg_try_advisory_lock( 783264760123456 ); -- Try to lock function > IF not varUnlocked THEN return NULL; END IF; -- exit if locking is > unsucessfull > > WRONG QUERY HERE WHICH INTERRUPT EXECUTION > > varUnlocked: