diff options
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 47c501c393e..ffcc324eb3e 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.187 2004/09/10 18:39:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.188 2004/09/13 20:06:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -401,11 +401,11 @@ CommandCounterIncrement(void) (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("cannot have more than 2^32-1 commands in a transaction"))); - /* Propagate new command ID into query snapshots, if set */ - if (QuerySnapshot) - QuerySnapshot->curcid = s->commandId; + /* Propagate new command ID into static snapshots, if set */ if (SerializableSnapshot) SerializableSnapshot->curcid = s->commandId; + if (LatestSnapshot) + LatestSnapshot->curcid = s->commandId; /* * make cache changes visible to me. @@ -3001,8 +3001,10 @@ CommitSubTransaction(void) s->state = TRANS_COMMIT; - /* Mark subtransaction as subcommitted */ + /* Must CCI to ensure commands of subtransaction are seen as done */ CommandCounterIncrement(); + + /* Mark subtransaction as subcommitted */ RecordSubTransactionCommit(); AtSubCommit_childXids(); |