Skip to content

Commit 15dd167

Browse files
committed
Avoid transaction overhead when there are no temp tables
to be deleted.
1 parent a24ebc3 commit 15dd167

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/utils/cache/temprel.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.11 1999/09/04 19:55:50 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.12 1999/09/04 21:45:48 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -79,6 +79,9 @@ remove_all_temp_relations(void)
7979
List *l,
8080
*next;
8181

82+
if (temp_rels == NIL)
83+
return;
84+
8285
AbortOutOfAnyTransaction();
8386
StartTransactionCommand();
8487

@@ -102,6 +105,7 @@ remove_all_temp_relations(void)
102105

103106
l = next;
104107
}
108+
temp_rels = NIL;
105109
CommitTransactionCommand();
106110
}
107111

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