mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Avoid transaction overhead when there are no temp tables
to be deleted.
This commit is contained in:
6
src/backend/utils/cache/temprel.c
vendored
6
src/backend/utils/cache/temprel.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.11 1999/09/04 19:55:50 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.12 1999/09/04 21:45:48 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -79,6 +79,9 @@ remove_all_temp_relations(void)
|
|||||||
List *l,
|
List *l,
|
||||||
*next;
|
*next;
|
||||||
|
|
||||||
|
if (temp_rels == NIL)
|
||||||
|
return;
|
||||||
|
|
||||||
AbortOutOfAnyTransaction();
|
AbortOutOfAnyTransaction();
|
||||||
StartTransactionCommand();
|
StartTransactionCommand();
|
||||||
|
|
||||||
@ -102,6 +105,7 @@ remove_all_temp_relations(void)
|
|||||||
|
|
||||||
l = next;
|
l = next;
|
||||||
}
|
}
|
||||||
|
temp_rels = NIL;
|
||||||
CommitTransactionCommand();
|
CommitTransactionCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user