FinishPreparedTransaction missing HOLD_INTERRUPTS section - Mailing list pgsql-hackers

From Stas Kelvich
Subject FinishPreparedTransaction missing HOLD_INTERRUPTS section
Date
Msg-id 3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru
Whole thread Raw
Responses Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section  (Michael Paquier <michael@paquier.xyz>)
Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Goodbye pg_pltemplate, hello trusted extensions
Next
From: Andres Freund
Date:
Subject: Postgres, fsync, and OSs (specifically linux)