diff options
author | Robert Haas <rhaas@postgresql.org> | 2018-07-16 17:33:22 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2018-07-16 17:55:13 -0400 |
commit | 4beb25c63221393f8a7ec790ebce1d6b5911289a (patch) | |
tree | b1967eb5507a296cd9a173b6e2de4b7bc971d0ef /src/backend/access/transam/xact.c | |
parent | 0bb28ca36eaf14ba73695bc0a29e3f36de34e07b (diff) | |
download | postgresql-4beb25c63221393f8a7ec790ebce1d6b5911289a.tar.gz postgresql-4beb25c63221393f8a7ec790ebce1d6b5911289a.zip |
Add subtransaction handling for table synchronization workers.
Since the old logic was completely unaware of subtransactions, a
change made in a subsequently-aborted subtransaction would still cause
workers to be stopped at toplevel transaction commit. Fix that by
managing a stack of worker lists rather than just one.
Amit Khandekar and Robert Haas
Discussion: http://postgr.es/m/CAJ3gD9eaG_mWqiOTA2LfAug-VRNn1hrhf50Xi1YroxL37QkZNg@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index df3dc1c168a..9004e38e6d4 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -4542,6 +4542,7 @@ CommitSubTransaction(void) AtEOSubXact_HashTables(true, s->nestingLevel); AtEOSubXact_PgStat(true, s->nestingLevel); AtSubCommit_Snapshot(s->nestingLevel); + AtEOSubXact_ApplyLauncher(true, s->nestingLevel); /* * We need to restore the upper transaction's read-only state, in case the @@ -4695,6 +4696,7 @@ AbortSubTransaction(void) AtEOSubXact_HashTables(false, s->nestingLevel); AtEOSubXact_PgStat(false, s->nestingLevel); AtSubAbort_Snapshot(s->nestingLevel); + AtEOSubXact_ApplyLauncher(false, s->nestingLevel); } /* |