]> granicus.if.org Git - postgresql/commit
Arrange for GetSnapshotData to copy live-subtransaction XIDs from the
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Sep 2006 15:59:39 +0000 (15:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Sep 2006 15:59:39 +0000 (15:59 +0000)
commit8fad2e3ff4d86e279366c9d0a398f1f2371493f3
treece3dcb3333b752d927dac4207c573626bef5c9b8
parentf79f57a0af619c071054c23763519b93e1f2f4fe
Arrange for GetSnapshotData to copy live-subtransaction XIDs from the
PGPROC array into snapshots, and use this information to avoid visits
to pg_subtrans in HeapTupleSatisfiesSnapshot.  This appears to solve
the pg_subtrans-related context swap storm problem that's been reported
by several people for 8.1.  While at it, modify GetSnapshotData to not
take an exclusive lock on ProcArrayLock, as closer analysis shows that
shared lock is always sufficient.
Itagaki Takahiro and Tom Lane
src/backend/access/transam/varsup.c
src/backend/storage/ipc/procarray.c
src/backend/utils/time/tqual.c
src/include/utils/tqual.h