diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-28 20:31:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-28 20:31:44 +0000 |
commit | 1c72d0dec1d9e087ddf4010fac098153677bf77d (patch) | |
tree | a8b1b309ed00be2afe1152e4001552ff6496dddf /src/backend/access/heap/hio.c | |
parent | f900af7961fb7009242dbcaf3b484d4b1ed8752d (diff) | |
download | postgresql-1c72d0dec1d9e087ddf4010fac098153677bf77d.tar.gz postgresql-1c72d0dec1d9e087ddf4010fac098153677bf77d.zip |
Fix relcache to account properly for subtransaction status of 'new'
relcache entries. Also, change TransactionIdIsCurrentTransactionId()
so that if consulted during transaction abort, it will not say that
the aborted xact is still current. (It would be better to ensure that
it's never called at all during abort, but I'm not sure we can easily
guarantee that.) In combination, these fix a crash we have seen
occasionally during parallel regression tests of 8.0.
Diffstat (limited to 'src/backend/access/heap/hio.c')
-rw-r--r-- | src/backend/access/heap/hio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index 14eab56aed9..30727f49b87 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/heap/hio.c,v 1.51 2003/11/29 22:39:39 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/heap/hio.c,v 1.52 2004/08/28 20:31:43 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -232,7 +232,7 @@ RelationGetBufferForTuple(Relation relation, Size len, * page. We can skip locking for new or temp relations, however, * since no one else could be accessing them. */ - needLock = !(relation->rd_isnew || relation->rd_istemp); + needLock = !RELATION_IS_LOCAL(relation); if (needLock) LockPage(relation, 0, ExclusiveLock); |