aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-04-20 16:59:31 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-04-20 16:59:31 -0400
commitc13ed70a4f26bae435c297ae09b1be9f50f2eede (patch)
tree46517ce2380fe97551f65da014e69881cff46e61 /src/tutorial/basics.source
parentd189deebd3c9e178c32c420a0df2b1ef9d445119 (diff)
downloadpostgresql-c13ed70a4f26bae435c297ae09b1be9f50f2eede.tar.gz
postgresql-c13ed70a4f26bae435c297ae09b1be9f50f2eede.zip
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.
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions