It was brought to my attention that DISCARD ALL does not release advisory locks:
http://pgfoundry.org/tracker/index.php?func=detail&aid=1010499&group_id=1000258&atid=983 Thus connection managers / poolers need to do that manually. This obviously means DISCARD ALL needs fixing. Applied patch adds LockReleaseAll(USER_LOCKMETHOD, true) call to DiscardAll(). Should this also be fixed in 8.3? -- marko
diff --git a/doc/src/sgml/ref/discard.sgml b/doc/src/sgml/ref/discard.sgml index ecae00b..f2d6ea2 100644 --- a/doc/src/sgml/ref/discard.sgml +++ b/doc/src/sgml/ref/discard.sgml @@ -82,6 +82,7 @@ CLOSE ALL; UNLISTEN *; DISCARD PLANS; DISCARD TEMP; +SELECT pg_advisory_unlock_all(); </programlisting> </para> </listitem> diff --git a/src/backend/commands/discard.c b/src/backend/commands/discard.c index d7bddbd..2917b76 100644 --- a/src/backend/commands/discard.c +++ b/src/backend/commands/discard.c @@ -68,4 +68,5 @@ DiscardAll(bool isTopLevel) Async_UnlistenAll(); ResetPlanCache(); ResetTempTableNamespace(); + LockReleaseAll(USER_LOCKMETHOD, true); }
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers