pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Stas Kelvich <s.kelvich@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section
Date: Sat, 28 Apr 2018 08:16:42 +0900
Message-ID: <20180427231642.GA2124@paquier.xyz> (raw)
In-Reply-To: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru>
References: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (3+ messages)  latest in thread

Message-ID: <20180427231642.GA2124@paquier.xyz>
Permalink:  ../20180427231642.GA2124@paquier.xyz/
Also on:    postgresql.org/message-id/20180427231642.GA2124@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, s.kelvich@postgrespro.ru
  Subject: Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section
  In-Reply-To: <20180427231642.GA2124@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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