Skip to content

Commit f78ecbf

Browse files
committed
Now that TransactionIdDidAbort doesn't think it should try to modify
pg_clog, there's no reason to do abort marking of subtransactions in a nonintuitive order.
1 parent c8702dc commit f78ecbf

File tree

1 file changed

+6
-6
lines changed
  • src/backend/access/transam

1 file changed

+6
-6
lines changed

src/backend/access/transam/xact.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.180 2004/08/28 20:31:43 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.181 2004/08/28 22:04:12 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -920,12 +920,12 @@ RecordTransactionAbort(void)
920920
* necessary but we may as well do it while we are here.
921921
*
922922
* The ordering here isn't critical but it seems best to mark the
923-
* parent last. That reduces the chance that concurrent
924-
* TransactionIdDidAbort calls will decide they need to do redundant
925-
* work.
923+
* parent first. This assures an atomic transition of all the
924+
* subtransactions to aborted state from the point of view of
925+
* concurrent TransactionIdDidAbort calls.
926926
*/
927-
TransactionIdAbortTree(nchildren, children);
928927
TransactionIdAbort(xid);
928+
TransactionIdAbortTree(nchildren, children);
929929

930930
END_CRIT_SECTION();
931931
}
@@ -1062,8 +1062,8 @@ RecordSubTransactionAbort(void)
10621062
* Mark the transaction aborted in clog. This is not absolutely
10631063
* necessary but we may as well do it while we are here.
10641064
*/
1065-
TransactionIdAbortTree(nchildren, children);
10661065
TransactionIdAbort(xid);
1066+
TransactionIdAbortTree(nchildren, children);
10671067

10681068
END_CRIT_SECTION();
10691069
}

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