Skip to content

Commit 95a797f

Browse files
committed
Merge commit '9dd080778dc6f9cac5e9affa4fd82909f1197000' into PGPRO9_6
2 parents a41b803 + 9dd0807 commit 95a797f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/pg_pathman/src/pathman_workers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ bgw_main_spawn_partitions(Datum main_arg)
365365
args->value_type);
366366

367367
/* Finish transaction in an appropriate way */
368-
if (args->result == InvalidOid || IsAbortedTransactionBlockState())
368+
if (args->result == InvalidOid)
369369
AbortCurrentTransaction();
370370
else
371371
CommitTransactionCommand();

contrib/pg_pathman/src/pg_pathman.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,9 @@ create_partitions_internal(Oid relid, Datum value, Oid value_type)
902902
FreeErrorData(edata);
903903

904904
SPI_finish(); /* no problem if not connected */
905+
906+
/* Reset 'partid' in case of error */
907+
partid = InvalidOid;
905908
}
906909
PG_END_TRY();
907910

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