postgresql/src/include/storage
Tom Lane 4513d9deda It turns out that TablespaceCreateDbspace fails badly if a relcache flush
occurs when it tries to heap_open pg_tablespace.  When control returns to
smgrcreate, that routine will be holding a dangling pointer to a closed
SMgrRelation, resulting in mayhem.  This is of course a consequence of
the violation of proper module layering inherent in having smgr.c call
a tablespace command routine, but the simplest fix seems to be to change
the locking mechanism.  There's no real need for TablespaceCreateDbspace
to touch pg_tablespace at all --- it's only opening it as a way of locking
against a parallel DROP TABLESPACE command.  A much better answer is to
create a special-purpose LWLock to interlock these two operations.
This drops TablespaceCreateDbspace quite a few layers down the food chain
and makes it something reasonably safe for smgr to call.
2006-01-19 04:45:38 +00:00
..
backendid.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
block.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
buf.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
buf_internals.h Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction 2005-12-29 18:08:05 +00:00
buffile.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
bufmgr.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
bufpage.h This patch cleans up the access to members of ItemIdData. 2005-09-22 16:46:00 +00:00
fd.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
freespace.h Convert the arithmetic for shared memory size calculation from 'int' 2005-08-20 23:26:37 +00:00
ipc.h Two-phase commit. Original patch by Heikki Linnakangas, with additional 2005-06-17 22:32:51 +00:00
item.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
itemid.h This patch cleans up the access to members of ItemIdData. 2005-09-22 16:46:00 +00:00
itempos.h Add parentheses to macros when args are used in computations. Without 2005-05-25 21:40:43 +00:00
itemptr.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
large_object.h Adjust lo_open() so that specifying INV_READ without INV_WRITE creates 2005-06-13 02:26:53 +00:00
lmgr.h Simplify lock manager data structures by making a clear separation between 2005-12-09 01:22:04 +00:00
lock.h Divide the lock manager's shared state into 'partitions', so as to 2005-12-11 21:02:18 +00:00
lwlock.h It turns out that TablespaceCreateDbspace fails badly if a relcache flush 2006-01-19 04:45:38 +00:00
off.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
pg_sema.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
pg_shmem.h Rearrange backend startup sequence so that ShmemIndexLock can become 2006-01-04 21:06:32 +00:00
pmsignal.h Add files to do read I/O on the cluster directory: 2005-08-12 03:25:13 +00:00
pos.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
proc.h Rearrange backend startup sequence so that ShmemIndexLock can become 2006-01-04 21:06:32 +00:00
procarray.h Rethink prior patch to filter out dead backend entries from the pgstats 2005-12-16 04:03:40 +00:00
relfilenode.h Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
s_lock.h Remove QNX port. 2006-01-05 01:56:30 +00:00
shmem.h Rearrange backend startup sequence so that ShmemIndexLock can become 2006-01-04 21:06:32 +00:00
sinval.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
sinvaladt.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
smgr.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
spin.h Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction 2005-12-29 18:08:05 +00:00