From 1b26b0737924ff2f1197c651f8f8086293e81df9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 26 Nov 2008 01:21:08 +0000 Subject: [PATCH] Make DISCARD ALL discard advisory locks, too. Marko Kreen --- doc/src/sgml/ref/discard.sgml | 3 ++- src/backend/commands/discard.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/discard.sgml b/doc/src/sgml/ref/discard.sgml index cca95f984e..2392e5bf54 100644 --- a/doc/src/sgml/ref/discard.sgml +++ b/doc/src/sgml/ref/discard.sgml @@ -1,5 +1,5 @@ @@ -80,6 +80,7 @@ RESET ALL; DEALLOCATE ALL; CLOSE ALL; UNLISTEN *; +SELECT pg_advisory_unlock_all(); DISCARD PLANS; DISCARD TEMP; diff --git a/src/backend/commands/discard.c b/src/backend/commands/discard.c index 65d910c320..e8a6ecb5d2 100644 --- a/src/backend/commands/discard.c +++ b/src/backend/commands/discard.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.4 2008/01/01 19:45:49 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.5 2008/11/26 01:21:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -66,6 +66,7 @@ DiscardAll(bool isTopLevel) DropAllPreparedStatements(); PortalHashTableDeleteAll(); Async_UnlistenAll(); + LockReleaseAll(USER_LOCKMETHOD, true); ResetPlanCache(); ResetTempTableNamespace(); } -- 2.40.0