postgresql/src/backend/commands
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
..
Makefile Tablespaces. Alternate database locations are dead, long live tablespaces. 2004-06-18 06:14:31 +00:00
aggregatecmds.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
alter.c Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
analyze.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
async.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
cluster.c Tweak indexscan machinery to avoid taking an AccessShareLock on an index 2005-12-03 05:51:03 +00:00
comment.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
conversioncmds.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
copy.c Add regression tests for CSV and \., and add automatic quoting of a 2005-12-28 03:25:32 +00:00
dbcommands.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
define.c Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
explain.c Fix EXPLAIN and EXECUTE commands to pass portal parameters through to 2005-11-29 01:25:50 +00:00
functioncmds.c Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the 2005-11-21 12:49:33 +00:00
indexcmds.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
lockcmds.c Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
opclasscmds.c Document that CREATE OPERATOR CLASS amounts to granting public execute 2006-01-13 18:10:25 +00:00
operatorcmds.c Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the 2005-11-21 12:49:33 +00:00
portalcmds.c Add a new system view, pg_cursors, that displays the currently available 2006-01-18 06:49:30 +00:00
prepare.c Add a new system view, pg_cursors, that displays the currently available 2006-01-18 06:49:30 +00:00
proclang.c Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
schemacmds.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
sequence.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
tablecmds.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
tablespace.c It turns out that TablespaceCreateDbspace fails badly if a relcache flush 2006-01-19 04:45:38 +00:00
trigger.c Repair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by 2006-01-12 21:48:53 +00:00
typecmds.c Require the issuer of CREATE TYPE to own the functions mentioned in the 2006-01-13 18:06:45 +00:00
user.c Allow CREATE/ALTER ROLE PASSWORD NULL to allow restoring the default state 2005-12-23 16:46:39 +00:00
vacuum.c Modify pgstats code to reduce performance penalties from oversized stats data 2006-01-18 20:35:06 +00:00
vacuumlazy.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
variable.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00
view.c Re-run pgindent, fixing a problem where comment lines after a blank 2005-11-22 18:17:34 +00:00