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 1qItZn-0000WA-Hy for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jul 2023 16:17:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qItZm-0000M6-E7 for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Jul 2023 16:17:26 +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 1qItZm-0000Lt-4w for pgsql-hackers@lists.postgresql.org; Mon, 10 Jul 2023 16:17:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qItZj-003J53-LJ for pgsql-hackers@postgresql.org; Mon, 10 Jul 2023 16:17: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 36AGHJRd2231131; Mon, 10 Jul 2023 12:17:19 -0400 From: Tom Lane To: Sergey Shinderuk cc: PostgreSQL Hackers Subject: Re: gcc -Wclobbered in PostgresMain In-reply-to: <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru> References: <2eda015b-7dff-47fd-d5e2-f1a9899b90a6@postgrespro.ru> <1632266.1688829082@sss.pgh.pa.us> <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru> Comments: In-reply-to Sergey Shinderuk message dated "Mon, 10 Jul 2023 12:39:52 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2231129.1689005839.1@sss.pgh.pa.us> Date: Mon, 10 Jul 2023 12:17:19 -0400 Message-ID: <2231130.1689005839@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sergey Shinderuk writes: > On 08.07.2023 18:11, Tom Lane wrote: >> Having done that, it wouldn't really be necessary to mark these >> as volatile. I kept that marking anyway for consistency with >> send_ready_for_query, but perhaps we shouldn't? > I don't know. Maybe marking them volatile is more future proof. Not sure. Yeah, after sleeping on it, it seems best to have a policy that all variables declared in that place are volatile. Even if there's no bug now, not having volatile creates a risk of surprising behavior after future changes. Pushed that way. regards, tom lane