forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite8528a8
committed
Fix deadlock at startup, if max_prepared_transactions is too small.
When the startup process recovers transactions by scanning pg_twophasedirectory, it should clear MyLockedGxact after it's done processing eachtransaction. Like we do during normal operation, at PREPARE TRANSACTION.Otherwise, if the startup process exits due to an error, it will try toclear the locking_backend field of the last recovered transaction. That'susually harmless, but if the error happens in MarkAsPreparing, whileholding TwoPhaseStateLock, the shmem-exit hook will try to acquireTwoPhaseStateLock again, and deadlock with itself.This fixes bug #13128 reported by Grant McAlister. The bug was introducedby commitbb38fb0, so backpatch to all supported versions like thatcommit.1 parent42f5227 commite8528a8
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2018 | 2018 |
| |
2019 | 2019 |
| |
2020 | 2020 |
| |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
2021 | 2027 |
| |
2022 | 2028 |
| |
2023 | 2029 |
| |
|
0 commit comments
Comments
(0)