8000 Not to change pg_log status after "commit". · rtpg/postgres@a9ba771 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9ba771

Browse files
author
Hiroshi Inoue
committed
Not to change pg_log status after "commit".
This will happen when elog(ERROR)(elog(FATAL) also in 7.0) is called in vacuum after the internal commit.
1 parent ffed578 commit a9ba771

File tree

1 file changed

+4
-3
lines changed
  • src/backend/access/transam

1 file changed

+4
-3
lines changed

src/backend/access/transam/xact.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.42.2.3 1999/09/09 16:29:22 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.42.2.4 1999/10/19 02:54:39 inoue Exp $
1111
*
1212
* NOTES
1313
* Transaction aborts can now occur two ways:
@@ -733,9 +733,10 @@ RecordTransactionAbort()
733733
/*
734734
* Have the transaction access methods record the status of
735735
* this transaction id in the pg_log relation. We skip it
736-
* if no one shared buffer was changed by this transaction.
736+
* if no one shared buffer was changed by this transaction
737+
* or this transaction has been committed already.
737738
*/
738-
if (SharedBufferChanged)
739+
if (SharedBufferChanged && !TransactionIdDidCommit(xid))
739740
TransactionIdAbort(xid);
740741

741742
ResetBufferPool();

0 commit comments

Comments
 (0)
0