Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCk1P-0003Os-Hl for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2021 14:11:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCk0s-0002xu-Ux for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2021 14:10:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCk0s-0002xn-Oo for pgsql-bugs@lists.postgresql.org; Thu, 18 Feb 2021 14:10:38 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCk0q-0001Xq-G2 for pgsql-bugs@lists.postgresql.org; Thu, 18 Feb 2021 14:10:38 +0000 X-Originating-IP: 79.88.149.14 Received: from [172.16.255.146] (14.149.88.79.rev.sfr.net [79.88.149.14]) (Authenticated sender: vik@postgresfriends.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id A8362FF802; Thu, 18 Feb 2021 14:10:32 +0000 (UTC) Subject: Re: BUG #16867: savepoints vs. commit and chain To: Fujii Masao , Arthur Nascimento Cc: pgsql-bugs@lists.postgresql.org References: <16867-3475744069228158@postgresql.org> <473dba6b-dfb3-b5a8-93c6-af3787893728@oss.nttdata.com> From: Vik Fearing Message-ID: <38fcac1f-e4b8-40ff-41ff-819b5ab8b9b7@postgresfriends.org> Date: Thu, 18 Feb 2021 15:10:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/18/21 2:58 PM, Fujii Masao wrote: > > > On 2021/02/17 3:03, Arthur Nascimento wrote: >> Hi, Fujii-san, >> >> On Tue, 16 Feb 2021 at 01:49, Fujii Masao >> wrote: >>> In the server side, ISTM that CommitTransactionCommand() needs to handle >>> the COMMIT AND CHAIN in TBLOCK_SUBCOMMIT case, but it forgot to do that. >>> Patch attached. I'm not sure if this is a bug or an intentional >>> behavior. >>> Probably we need to look at the past discussion about AND CHAIN feature. >> >> I can confirm that your patch solved it for me. Thanks for looking >> into it. > > Thanks for testing the patch! > > As far as I read the past discussion about chain transaction, > I could not find any mention that current behavior that you reported > is intentional. > > Barring any objection, I will commit the patch that you wrote > for psql and the patch I wrote. No objection from me. According to the standard, a COMMIT should destroy all savepoints and terminate the transaction, even if AND CHAIN is specified. -- Vik Fearing