postgresql/src
Heikki Linnakangas 223a946804 Fix deadlock at startup, if max_prepared_transactions is too small.
When the startup process recovers transactions by scanning pg_twophase
directory, it should clear MyLockedGxact after it's done processing each
transaction. Like we do during normal operation, at PREPARE TRANSACTION.
Otherwise, if the startup process exits due to an error, it will try to
clear the locking_backend field of the last recovered transaction. That's
usually harmless, but if the error happens in MarkAsPreparing, while
holding TwoPhaseStateLock, the shmem-exit hook will try to acquire
TwoPhaseStateLock again, and deadlock with itself.

This fixes bug #13128 reported by Grant McAlister. The bug was introduced
by commit bb38fb0d, so backpatch to all supported versions like that
commit.
2015-04-23 21:37:09 +03:00
..
backend Fix deadlock at startup, if max_prepared_transactions is too small. 2015-04-23 21:37:09 +03:00
bin Fix assorted inconsistent function declarations. 2015-04-07 16:56:21 -04:00
include Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses. 2015-02-17 12:49:18 -05:00
interfaces Fix documentation for libpq's PQfn(). 2015-03-08 13:35:53 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:14:15 -05:00
pl Free SQLSTATE and SQLERRM no earlier than other PL/pgSQL variables. 2015-02-25 23:49:45 -05:00
port Unlink static libraries before rebuilding them. 2015-03-01 13:08:48 -05:00
template Don't try to force use of -no-cpp-precomp on OS X. It's been five years 2010-08-02 04:51:25 +00:00
test Fix incorrect matching of subexpressions in outer-join plan nodes. 2015-04-04 19:55:15 -04:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:46:22 -05:00
tools Have config_sspi_auth() permit IPv6 localhost connections. 2014-12-25 14:10:21 -05:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:25 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Rethink the way walreceiver is linked into the backend. Instead than shoving 2010-01-20 09:16:24 +00:00
Makefile.global.in Add mode where contrib installcheck runs each module in a separately named database. 2012-12-11 11:48:00 -05:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:08:48 -05:00
nls-global.mk Avoid error from mkdir if no languages are to be installed 2010-05-13 14:35:28 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00