Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEHlX-0004ZQ-1B for pgsql-hackers@arkaria.postgresql.org; Thu, 03 May 2018 17:11:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fEHlV-0008Ou-St for pgsql-hackers@arkaria.postgresql.org; Thu, 03 May 2018 17:11:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEHlV-0008Ok-M3 for pgsql-hackers@lists.postgresql.org; Thu, 03 May 2018 17:11:33 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fEHlS-00085l-66 for pgsql-hackers@postgresql.org; Thu, 03 May 2018 17:11:33 +0000 Received: from xor.sai.msu.ru (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id 77E57B191A0; Thu, 3 May 2018 20:11:28 +0300 (MSK) Subject: Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section To: Stas Kelvich , PostgreSQL Hackers References: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru> From: Teodor Sigaev Message-ID: <134675be-cf09-7f8c-9eba-e87fb13990d5@sigaev.ru> Date: Thu, 3 May 2018 20:11:28 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 In-Reply-To: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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/