]> granicus.if.org Git - postgresql/commitdiff
Make DISCARD ALL discard advisory locks, too. Marko Kreen
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Nov 2008 01:21:08 +0000 (01:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Nov 2008 01:21:08 +0000 (01:21 +0000)
doc/src/sgml/ref/discard.sgml
src/backend/commands/discard.c

index cca95f984e750eaff69ddfc272c46f87cf77c3e9..2392e5bf549ba3422d135ef59a6ac08a5bd99076 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/discard.sgml,v 1.3 2008/11/14 10:22:46 petere Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/discard.sgml,v 1.4 2008/11/26 01:21:07 tgl Exp $
 PostgreSQL documentation
 -->
 
@@ -80,6 +80,7 @@ RESET ALL;
 DEALLOCATE ALL;
 CLOSE ALL;
 UNLISTEN *;
+SELECT pg_advisory_unlock_all();
 DISCARD PLANS;
 DISCARD TEMP;
 </programlisting>
index 65d910c3209ed751a2242ca5ee53606c41b5256a..e8a6ecb5d24081f4517e719c57f29439510c97ab 100644 (file)
@@ -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();
 }