postgresql/src/backend/access
Heikki Linnakangas 2c47fe16a7 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:39:35 +03:00
..
brin Move BRIN page type to page's last two bytes 2015-03-10 12:27:15 -03:00
common Add log_min_autovacuum_duration per-table option 2015-04-03 11:55:50 -03:00
gin Make ginbuild's funcCtx be independent of its tmpCtx. 2015-03-29 14:02:58 -04:00
gist Fix GiST index-only scans for opclasses with different storage type. 2015-03-26 23:07:52 +02:00
hash Remove unnecessary variables in _hash_splitbucket(). 2015-04-03 16:49:44 -04:00
heap Optimize locking a tuple already locked by another subxact 2015-04-10 13:47:15 -03:00
index Add support for index-only scans in GiST. 2015-03-26 19:12:00 +02:00
nbtree Remove duplicated word in README 2015-04-13 14:28:21 -03:00
rmgrdesc Merge the various forms of transaction commit & abort records. 2015-03-15 17:37:07 +01:00
spgist Add support for index-only scans in GiST. 2015-03-26 19:12:00 +02:00
transam Fix deadlock at startup, if max_prepared_transactions is too small. 2015-04-23 21:39:35 +03:00
Makefile BRIN: Block Range Indexes 2014-11-07 16:38:14 -03:00