FinishPreparedTransaction missing HOLD_INTERRUPTS section

From: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: FinishPreparedTransaction missing HOLD_INTERRUPTS section
Date: 2018-04-27 21:36:16
Message-ID: 3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
0001-Add-HOLD_INTERRUPTS-section-into-FinishPreparedTrans.patch application/octet-stream 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-04-27 22:28:42 Postgres, fsync, and OSs (specifically linux)
Previous Message Tom Lane 2018-04-27 21:15:50 Re: Goodbye pg_pltemplate, hello trusted extensions