pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2c47fe16a709e01dea403643a1ff4d00c8c8c1ad Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/438a062d54035febf4769618950d11eda48247c4 Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f73ebd766a4903ab937b28c3cc90a53b6dcb61f4 Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/d3f5d2892bc7f48adce4116d7f99f75214544934 Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e8528a8f5d411f0d9a1a9f927eae332992949aa1 Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma @ 2015-04-23 18:40 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2015-04-23 18:40 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_0_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/223a946804aafeefc6cb26de276776eec576547d Modified Files -------------- src/backend/access/transam/twophase.c | 6 ++++++ 1 file changed, 6 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-04-23 18:40 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-04-23 18:40 pgsql: Fix deadlock at startup, if max_prepared_transactions is too sma Heikki Linnakangas <heikki.linnakangas@iki.fi>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox