diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 1999-09-16 09:08:56 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 1999-09-16 09:08:56 +0000 |
commit | 2d0eee32c4af9577e0e27f3f499fa81464a73949 (patch) | |
tree | fd39f2f8948701dbe600d9bf8af1f1ddd571d2ab /src | |
parent | f2fa38ded527986e65a1d9fd7cb5bb684e216e1d (diff) | |
download | postgresql-2d0eee32c4af9577e0e27f3f499fa81464a73949.tar.gz postgresql-2d0eee32c4af9577e0e27f3f499fa81464a73949.zip |
Changes made by Hiroshi Inoue and approved by Vadim.
See attached mail for more details.
-------------------------------------------------------------------
From: "Vadim Mikheev" <vadim@krs.ru>
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
References: <000201befa94$42fe04c0$2801007e@cadzone.tpf.co.jp>
Subject: Re: elog(ERROR) in vacuum
Date: Fri, 10 Sep 1999 10:27:10 +0900
Organization: OJSC Rostelecom (Krasnoyarsk)
Message-ID: <37D85E6E.5AFA126D@krs.ru>
Hiroshi Inoue wrote:
>
> Hello Vadim,
>
> I have a question about vacuum.
>
> VACUUM has a phase like commit which calls TransactionIdCommit().
> But if elog(ERROR) occured after that,the status of transaction is
> changed from XID_COMMIT to XID_ABORT.
>
> Seems to me this causes inconsistency.
> Shoudn't AbortTransaction() be changed not to call TransacionIdAbort()
> in case of vacuum.
You're right!
As usual -:)
Vadim
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/transam/xact.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index b6e19d614e2..1c5dae27be2 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.51 1999/09/09 16:25:35 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.52 1999/09/16 09:08:56 ishii Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -736,7 +736,7 @@ RecordTransactionAbort() * this transaction id in the pg_log relation. We skip it * if no one shared buffer was changed by this transaction. */ - if (SharedBufferChanged) + if (SharedBufferChanged && !TransactionIdDidCommit(xid)) TransactionIdAbort(xid); ResetBufferPool(); |