Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCCbs-0000kc-9o for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Apr 2018 23:17:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fCCbq-0006yg-TI for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Apr 2018 23:16:58 +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 1fCCbp-0006yV-UD for pgsql-hackers@lists.postgresql.org; Fri, 27 Apr 2018 23:16:58 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fCCbm-0002Pf-G8 for pgsql-hackers@postgresql.org; Fri, 27 Apr 2018 23:16:57 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2AC3B20DCC; Fri, 27 Apr 2018 19:16:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 27 Apr 2018 19:16:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=v0qPHspo8dvUGEPRw0INSrJikTaVCM7o30a4cWnTnZU=; b=0zBfkmlP z60VvzgE8UTxtpK1LT+QgqJR/xz+s5LjvFJRf2gz1UvU9nNUPhlVKnYiC6t5kdHl 56FCbFDkDQKQ8fgAsjsUJgsSDsgySOpB77ZDW0t5ZZ9EQ/2tZJaLObTmqd7kDN9o 2HSUwqlf4yFKo3JNpAcTjE1bKfZJQqQmnmh1gMj0pMoygo/s4/YmOl8vPy+tZqTJ ZmgFYZSqXIOl2fo/X+r875k1YIGqkwsF8q+9CcDI+ZIqcUlXJMDozn4mfNwI/gwK t8ldVJDhpkxMWZB97KjL33M5QIJhF6YHhOIGopFe+LNbIKQy9ztQgT2aeqJXoaf8 Ythb1quY644SsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=v0qPHspo8dvUGEPRw0INSrJikTaVC M7o30a4cWnTnZU=; b=N0ytrZtxcQcMXT2p8X/8FMxR+PZqKwCQ1dCxvKZHwGLpJ VSfjCLQYxvOGzpwCPNlxpeErEToA3dBJ6UCPza2Y1TfOe2TwaNObYzbSYFdbkgyx o/iQytlR3z6VgL4C8xSNplzw5jHvnsMwjYrfZAjEQljIwW2GVqn4RzYmwEeGNwXY /fjGpqhfLDJU/j3VrBDwkKc7LolUpc2fMmnGUO/2Px6Zo5lvi0qUdrayKMISa1Nf OzgnkhB3xdprJ1nNOQg2JHSSC/Uj7+j6e9P3xZH7N9YKrkzpcjxN26R5dDJ0Rjmc ZGkb5fAle5z2+ufKL6Wk/KhUQ5W5U1TuKNMroflvQ== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id BB4A1E5098; Fri, 27 Apr 2018 19:16:50 -0400 (EDT) Date: Sat, 28 Apr 2018 08:16:42 +0900 From: Michael Paquier To: Stas Kelvich Cc: PostgreSQL Hackers Subject: Re: FinishPreparedTransaction missing HOLD_INTERRUPTS section Message-ID: <20180427231642.GA2124@paquier.xyz> References: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <3AD85097-A3F3-4EBA-99BD-C38EDF8D2949@postgrespro.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 pri= nt > a warning with ereport(), which, in turn will check for interrupts and > therefore can cancel backend or throw an error before GXact clean-up. >=20 > 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 --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlrjr1oACgkQnvQgOdby QH2hXg//bZr3ehPRyssSIo/2fUNaX0/mwDU6HLrjWy+LLeVAXY6jvwH/CmgX/AYc TCiOvESVE/UIM2WnPy1cUM4FBf8AJJ2QeeNcnisR0Xb2JzqW4yHhEQP6m09ubVTI ckQuFTZXl5+LITJp5eAO2GA447HD/N82jHdimCYkUHfqgyJUInKgZ3ZMLUAo25bH STSzjFAjFllUS5OIu3bNOI4HN7Zss2m3fqz9NJPa1lub0H2ygwlhaPt99HEuy+zA PWNpiXXz/PK6k92OVrlSLH45NKY1VQPKf/uqbvzjrXBIyAaR+OnLC3LXwKjbjCNU iQ6jXfw+3iTs9/x3aIBVqUlChdK6o6VXBcnPIeE0sStcGq3tdWt3Dknq+sWG4Leb Dm3y8Mc5pDx08HX1pAQ29GrGuNpKKjufrx7APOj3Fo8jggqcnes9bJGRTQClgT5/ sWQLRseFqoIvUzBQWLDaVxxzTtWW5sMfr/HeT/vWw5EwSfS1kpzq6MfgDG4B+y4O tS8i1ZumSZl9R1hJkhvRaZra7v8p3L6joOpJ+Bp5U6owBepwiPVRp6dZElBOkxDp QOZARL+Kf07Ci1EHbYrSRompwRzcTA/5A939gIZWAnsQwDpeEzSisSrgccAJrMMi ijN4qcQqVc8AnahEgs+oh4Y99YTMR22lUObsccxwLUkwaUcF9nQ= =+Bg4 -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--