postgres/src
Tom Lane ac63dca607 Fix longstanding race condition in plancache.c.
When creating or manipulating a cached plan for a transaction control
command (particularly ROLLBACK), we must not perform any catalog accesses,
since we might be in an aborted transaction.  However, plancache.c busily
saved or examined the search_path for every cached plan.  If we were
unlucky enough to do this at a moment where the path's expansion into
schema OIDs wasn't already cached, we'd do some catalog accesses; and with
some more bad luck such as an ill-timed signal arrival, that could lead to
crashes or Assert failures, as exhibited in bug #8095 from Nachiket Vaidya.
Fortunately, there's no real need to consider the search path for such
commands, so we can just skip the relevant steps when the subject statement
is a TransactionStmt.  This is somewhat related to bug #5269, though the
failure happens during initial cached-plan creation rather than
revalidation.

This bug has been there since the plan cache was invented, so back-patch
to all supported branches.
2013-04-20 17:00:23 -04:00
..
backend Fix longstanding race condition in plancache.c. 2013-04-20 17:00:23 -04:00
bin pg_ctl: Add idempotent option 2013-04-13 23:42:42 -04:00
common Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
include Clean up references to SQL92 2013-04-20 11:04:41 -04:00
interfaces Clean up references to SQL92 2013-04-20 11:04:41 -04:00
makefiles Blind attempt at fixing the non-MSVC Windows builds 2013-02-22 11:51:15 -03:00
pl Move pqsignal() to libpgport. 2013-03-17 12:06:42 -04:00
port initdb needs pqsignal() even on Windows. 2013-03-17 15:19:47 -04:00
template Remove _FORTIFY_SOURCE 2012-10-10 21:42:38 -04:00
test Clean up references to SQL92 2013-04-20 11:04:41 -04:00
timezone Update time zone data files to tzdata release 2013b. 2013-03-28 15:25:48 -04:00
tools pgindent: add newline to die() so script line number is not reported on failure. 2013-04-16 10:30:35 -04:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix sporadic rebuilds for .pc files 2013-04-12 22:49:25 -04:00
Makefile.shlib Add pkg-config files for libpq and ecpg libraries 2013-03-31 16:58:40 -04:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00