diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-22 21:40:55 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-22 21:40:55 +0000 |
| commit | a2597ef17958e75e7ba26507dc407249cc9e7134 (patch) | |
| tree | b183395473fde3961ed029a4c82f384e2a392d4d /src/backend/access | |
| parent | b8ffc9960235afec9f0a81fc15665514241c2a75 (diff) | |
| download | postgresql-a2597ef17958e75e7ba26507dc407249cc9e7134.tar.gz | |
Modify sequence state storage to eliminate dangling-pointer problem
exemplified by bug #671. Moving the storage to relcache turned out to
be a bad idea because relcache might decide to discard the info. Instead,
open and close the relcache entry on each sequence operation, and use
a record of the current XID to discover whether we already hold
AccessShareLock on the sequence.
Diffstat (limited to 'src/backend/access')
| -rw-r--r-- | src/backend/access/transam/xact.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 10de2f8a6d..b874b4790a 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.123 2002/05/21 22:05:53 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.124 2002/05/22 21:40:55 tgl Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -166,7 +166,6 @@ #include "catalog/index.h" #include "catalog/namespace.h" #include "commands/async.h" -#include "commands/sequence.h" #include "commands/trigger.h" #include "executor/spi.h" #include "libpq/be-fsstubs.h" @@ -947,7 +946,6 @@ CommitTransaction(void) /* NOTIFY commit must also come before lower-level cleanup */ AtCommit_Notify(); - CloseSequences(); AtEOXact_portals(); /* Here is where we really truly commit. */ @@ -1063,7 +1061,6 @@ AbortTransaction(void) DeferredTriggerAbortXact(); lo_commit(false); /* 'false' means it's abort */ AtAbort_Notify(); - CloseSequences(); AtEOXact_portals(); /* Advertise the fact that we aborted in pg_clog. */ |
