postgresql/src
Tom Lane 483b17119a Fix relcache reload mechanism to be more robust in the face of errors
occurring during a reload, such as query-cancel.  Instead of zeroing out
an existing relcache entry and rebuilding it in place, build a new relcache
entry, then swap its contents with the old one, then free the new entry.
This avoids problems with code believing that a previously obtained pointer
to a cache entry must still reference a valid entry, as seen in recent
failures on buildfarm member jaguar.  (jaguar is using CLOBBER_CACHE_ALWAYS
which raises the probability of failure substantially, but the problem
could occur in the field without that.)  The previous design was okay
when it was made, but subtransactions and the ResourceOwner mechanism
make it unsafe now.

Also, make more use of the already existing rd_isvalid flag, so that we
remember that the entry requires rebuilding even if the first attempt fails.

Back-patch as far as 8.2.  Prior versions have enough issues around relcache
reload anyway (due to inadequate locking) that fixing this one doesn't seem
worthwhile.
2010-01-12 18:12:40 +00:00
..
backend Fix relcache reload mechanism to be more robust in the face of errors 2010-01-12 18:12:40 +00:00
bin Translation updates 2009-12-08 22:13:05 +00:00
include tag 8.2.15 2009-12-10 03:09:47 +00:00
interfaces Set errno to zero before invoking SSL_read or SSL_write. It appears that 2009-12-30 03:46:08 +00:00
makefiles Add $(CFLAGS) to the simplified build rule for .so libraries on Darwin. 2006-11-28 05:45:43 +00:00
pl Previous fix for temporary file management broke returning a set from 2009-12-29 17:41:26 +00:00
port tag 8.2.15 2009-12-10 03:09:47 +00:00
template Make --with-ldap build on Unixware, per Olivier Prenant. 2006-12-14 21:50:07 +00:00
test Fix the handling of sub-SELECTs appearing in the arguments of an outer-level 2009-04-25 16:45:12 +00:00
timezone Update time zone data files to tzdata release 2009s: DST law changes in 2009-12-09 00:36:18 +00:00
tools Enable the use of multiple CPUs/cores when building on MSVC. This only 2009-08-10 11:48:48 +00:00
tutorial Fix some misuses of strncat(). 2006-09-27 16:19:42 +00:00
bcc32.mak Fix bcc32.mak to create and remove pg_config_os.h properly. Apparently 2006-10-06 18:53:53 +00:00
DEVELOPERS
Makefile
Makefile.global.in On Windows, we know the backend stack size limit because we have to 2006-10-08 17:15:34 +00:00
Makefile.shlib
nls-global.mk
win32.mak