Skip to content

Commit 1b26b07

Browse files
committed
Make DISCARD ALL discard advisory locks, too. Marko Kreen
1 parent 739259d commit 1b26b07

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/src/sgml/ref/discard.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/discard.sgml,v 1.3 2008/11/14 10:22:46 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/discard.sgml,v 1.4 2008/11/26 01:21:07 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -80,6 +80,7 @@ RESET ALL;
8080
DEALLOCATE ALL;
8181
CLOSE ALL;
8282
UNLISTEN *;
83+
SELECT pg_advisory_unlock_all();
8384
DISCARD PLANS;
8485
DISCARD TEMP;
8586
</programlisting>

src/backend/commands/discard.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.4 2008/01/01 19:45:49 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/discard.c,v 1.5 2008/11/26 01:21:08 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -66,6 +66,7 @@ DiscardAll(bool isTopLevel)
6666
DropAllPreparedStatements();
6767
PortalHashTableDeleteAll();
6868
Async_UnlistenAll();
69+
LockReleaseAll(USER_LOCKMETHOD, true);
6970
ResetPlanCache();
7071
ResetTempTableNamespace();
7172
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy