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 1nTl0q-0000jZ-9M for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Mar 2022 13:45:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nTl0p-00053y-5T for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Mar 2022 13:45:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTl0o-00053p-Tu for pgsql-bugs@lists.postgresql.org; Mon, 14 Mar 2022 13:45:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTl0l-0001QR-TW for pgsql-bugs@lists.postgresql.org; Mon, 14 Mar 2022 13:45:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22EDjHG3170697; Mon, 14 Mar 2022 09:45:17 -0400 From: Tom Lane To: Kyotaro Horiguchi cc: sawada.mshk@gmail.com, d.koval@postgrespro.ru, dilipbalaut@gmail.com, andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end In-reply-to: <20220314.173000.398225758850773114.horikyota.ntt@gmail.com> References: <982894.1647028392@sss.pgh.pa.us> <20220314.173000.398225758850773114.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Mon, 14 Mar 2022 17:30:00 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <170695.1647265517.1@sss.pgh.pa.us> Date: Mon, 14 Mar 2022 09:45:17 -0400 Message-ID: <170696.1647265517@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kyotaro Horiguchi writes: > ERRCODE_FEATURE_NOT_SUPPORTED doesn't look proper for the case. Isn't > it ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE or something like? Mmm ... I guess you could think of it that way, but it seems a little weird, because you have to suppose that the *transaction* not the GUC itself is the object that is in the wrong state. We could use ERRCODE_ACTIVE_SQL_TRANSACTION as is done in check_XactIsoLevel et al. But this code is supposed to be generic, and if there are ever any other GUCs marked NO_RESET, who's to say if that would be appropriate at all for them? I'm OK with FEATURE_NOT_SUPPORTED. regards, tom lane