Modify sequence state storage to eliminate dangling-pointer problem
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 May 2002 21:40:55 +0000 (21:40 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 May 2002 21:40:55 +0000 (21:40 +0000)
commit37750eceefb1f6a43bbff3d8e45ee75bdbaa8634
treee40104469a0713de4f63f85bfca58f69292dec23
parentf9c70e41b4059be94119683d8a620615c602b2df
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.
src/backend/access/transam/xact.c
src/backend/commands/define.c
src/backend/commands/sequence.c
src/include/commands/defrem.h
src/include/commands/sequence.h