postgresql/src/include/utils
Tom Lane bcc9b17bbf Fix race condition in relcache init file invalidation.
The previous code tried to synchronize by unlinking the init file twice,
but that doesn't actually work: it leaves a window wherein a third process
could read the already-stale init file but miss the SI messages that would
tell it the data is stale.  The result would be bizarre failures in catalog
accesses, typically "could not read block 0 in file ..." later during
startup.

Instead, hold RelCacheInitLock across both the unlink and the sending of
the SI messages.  This is more straightforward, and might even be a bit
faster since only one unlink call is needed.

This has been wrong since it was put in (in 2002!), so back-patch to all
supported releases.
2011-08-16 13:12:17 -04:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
acl.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
array.h Remove SQL-compatibility function cardinality(). It is not exactly clear 2009-04-09 17:39:50 +00:00
ascii.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
builtins.h Accept 'on' and 'off' as input for boolean data type, unifying the syntax 2009-03-09 14:34:35 +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 Update copyright for 2009. 2009-01-01 17:24:05 +00:00
combocid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
date.h Avoid unexpected conversion overflow in planner for distant date values. 2010-12-28 22:50:30 -05:00
datetime.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
datum.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
dynahash.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
dynamic_loader.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
elog.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
errcodes.h Add new SQL:2008 error codes for invalid LIMIT and OFFSET values. Remove 2009-03-04 10:55:00 +00:00
flatfiles.h Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
fmgrtab.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
formatting.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
geo_decls.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
guc.h Prevent ALTER USER f RESET ALL from removing the settings that were put there 2010-03-25 14:44:51 +00:00
guc_tables.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
help_config.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
hsearch.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
inet.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
int8.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
inval.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
logtape.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
lsyscache.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
memutils.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nabstime.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
numeric.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
palloc.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_crc.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pg_locale.h Update copyright for 2009. 2009-01-01 17:24:05 +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 2009. 2009-01-01 17:24:05 +00:00
plancache.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
portal.h The previous fix in CVS HEAD and 8.4 for handling the case where a cursor 2010-07-05 09:27:24 +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 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
relcache.h Fix race condition in relcache init file invalidation. 2011-08-16 13:12:17 -04:00
resowner.h Fix bug in temporary file management with subtransactions. A cursor opened 2009-12-03 11:03:35 +00:00
selfuncs.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
snapmgr.h Fix snapshot management, take two. 2009-10-07 16:27:29 +00:00
snapshot.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
syscache.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
timestamp.h Fix overflow for INTERVAL 'x ms' where x is more than a couple million, 2009-08-18 21:23:21 +00:00
tqual.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
tuplesort.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
tuplestore.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
typcache.h Fix up flushing of composite-type typcache entries to be driven directly by 2010-09-02 03:16:59 +00:00
tzparser.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
uuid.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
varbit.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
xml.h Export xml.c's libxml-error-handling support so that contrib/xml2 can use it 2010-03-03 17:29:53 +00:00