postgresql/src/include/utils
Tom Lane cbe9d6beb4 Fix up rickety handling of relation-truncation interlocks.
Move rd_targblock, rd_fsm_nblocks, and rd_vm_nblocks from relcache to the smgr
relation entries, so that they will get reset to InvalidBlockNumber whenever
an smgr-level flush happens.  Because we now send smgr invalidation messages
immediately (not at end of transaction) when a relation truncation occurs,
this ensures that other backends will reset their values before they next
access the relation.  We no longer need the unreliable assumption that a
VACUUM that's doing a truncation will hold its AccessExclusive lock until
commit --- in fact, we can intentionally release that lock as soon as we've
completed the truncation.  This patch therefore reverts (most of) Alvaro's
patch of 2009-11-10, as well as my marginal hacking on it yesterday.  We can
also get rid of assorted no-longer-needed relcache flushes, which are far more
expensive than an smgr flush because they kill a lot more state.

In passing this patch fixes smgr_redo's failure to perform visibility-map
truncation, and cleans up some rather dubious assumptions in freespace.c and
visibilitymap.c about when rd_fsm_nblocks and rd_vm_nblocks can be out of
date.
2010-02-09 21:43:30 +00:00
..
acl.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
array.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
ascii.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
attoptcache.h Fix several oversights in previous commit - attribute options patch. 2010-01-22 16:42:31 +00:00
builtins.h Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
bytea.h Add get_bit/set_bit functions for bit strings, paralleling those for bytea, 2010-01-25 20:55:32 +00:00
cash.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
catcache.h Remove CatalogCacheFlushRelation, and the reloidattr infrastructure that was 2010-02-08 05:53:55 +00:00
combocid.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
date.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
datetime.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
datum.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
dynahash.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
dynamic_loader.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
elog.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
errcodes.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
fmgrtab.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
formatting.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
geo_decls.h Add point_ops opclass for GiST. 2010-01-14 16:31:09 +00:00
guc.h Remove the default_do_language parameter, instead making DO use a hardwired 2010-01-26 16:33:40 +00:00
guc_tables.h Introduce Streaming Replication. 2010-01-15 09:19:10 +00:00
help_config.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
hsearch.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
inet.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
int8.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
inval.h Remove old-style VACUUM FULL (which was known for a little while as 2010-02-08 04:33:55 +00:00
logtape.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
lsyscache.h When estimating the selectivity of an inequality "column > constant" or 2010-01-04 02:44:40 +00:00
memutils.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nabstime.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
numeric.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
palloc.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
pg_crc.h Remove all the special-case code for INT64_IS_BUSTED, per decision that 2010-01-07 04:53:35 +00:00
pg_locale.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
pg_lzcompress.h This patch addresses some issues in TOAST compression strategy that 2008-03-07 23:20:21 +00:00
pg_rusage.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
plancache.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
portal.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
ps_status.h Add GUC update_process_title to control whether 'ps' display is updated 2006-06-27 22:16:44 +00:00
rel.h Fix up rickety handling of relation-truncation interlocks. 2010-02-09 21:43:30 +00:00
relcache.h Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
relmapper.h Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
resowner.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
selfuncs.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
snapmgr.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
snapshot.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
spccache.h Support ALTER TABLESPACE name SET/RESET ( tablespace_options ). 2010-01-05 21:54:00 +00:00
syscache.h Support ALTER TABLESPACE name SET/RESET ( tablespace_options ). 2010-01-05 21:54:00 +00:00
timestamp.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
tqual.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
tuplesort.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
tuplestore.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
typcache.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
tzparser.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
uuid.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
varbit.h Add get_bit/set_bit functions for bit strings, paralleling those for bytea, 2010-01-25 20:55:32 +00:00
xml.h Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00