Thread
Commits
-
Add HOLD_INTERRUPTS section into FinishPreparedTransaction.
- 540e7a6e535e 9.3.23 landed
- 6bd659f19cac 9.4.18 landed
- d3fc427f478f 9.5.13 landed
- d9b3bc55201a 9.6.9 landed
- ee492e3dedbd 10.4 landed
- 8f9be261f437 11.0 landed
-
FinishPreparedTransaction missing HOLD_INTERRUPTS section
Stas Kelvich <s.kelvich@postgrespro.ru> — 2018-04-27T21:36:16Z
Hello. It seems that during COMMIT PREPARED FinishPreparedTransaction() doesn't hold interrupts around writing to wal and cleaning up ProcArray and GXact entries. At least RemoveTwoPhaseFile (which is called in between) can print a warning with ereport(), which, in turn will check for interrupts and therefore can cancel backend or throw an error before GXact clean-up. Other similar places like CommitTransaction and PrepareTransaction have such hold interrupts sections. -- Stas Kelvich Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
-
Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section
Michael Paquier <michael@paquier.xyz> — 2018-04-27T23:16:42Z
On Sat, Apr 28, 2018 at 12:36:16AM +0300, Stas Kelvich wrote: > It seems that during COMMIT PREPARED FinishPreparedTransaction() doesn't > hold interrupts around writing to wal and cleaning up ProcArray and GXact > entries. At least RemoveTwoPhaseFile (which is called in between) can print > a warning with ereport(), which, in turn will check for interrupts and > therefore can cancel backend or throw an error before GXact clean-up. > > Other similar places like CommitTransaction and PrepareTransaction have > such hold interrupts sections. Good catch! The places you are suggesting look good to me as well. That's something which should be back-patched as well. -- Michael
-
Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section
Teodor Sigaev <teodor@sigaev.ru> — 2018-05-03T17:11:28Z
Thank you, pushed! Stas Kelvich wrote: > Hello. > > It seems that during COMMIT PREPARED FinishPreparedTransaction() doesn't > hold interrupts around writing to wal and cleaning up ProcArray and GXact > entries. At least RemoveTwoPhaseFile (which is called in between) can print > a warning with ereport(), which, in turn will check for interrupts and > therefore can cancel backend or throw an error before GXact clean-up. > > Other similar places like CommitTransaction and PrepareTransaction have > such hold interrupts sections. > > -- > Stas Kelvich > Postgres Professional: http://www.postgrespro.com > The Russian Postgres Company > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/