Thursday, June 19, 2008

[BUGS] BUG advisory_lock

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 ); -- unlock function
END
 
NEXT time when I run this function I always get NULL until server reboot
 
EXPECTED: Pg must unlock if function execution failed

No comments: