Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZWwW-005kbQ-SO for pgsql-committers@arkaria.postgresql.org; Fri, 25 Aug 2023 13:33:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qZWwV-003Fci-Jq for pgsql-committers@arkaria.postgresql.org; Fri, 25 Aug 2023 13:33:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZWwV-003FcW-Bh for pgsql-committers@lists.postgresql.org; Fri, 25 Aug 2023 13:33:39 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZWwR-000ylu-Ib for pgsql-committers@lists.postgresql.org; Fri, 25 Aug 2023 13:33:38 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 639CD40007; Fri, 25 Aug 2023 13:33:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------U27MlEsyQG2Ca05m5SZDXtRh" Message-ID: <7a219b25-b71b-f3ab-5f60-072b65e03d0d@dunslane.net> Date: Fri, 25 Aug 2023 09:33:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: pgsql: Cache by-reference missing values in a long lived context Content-Language: en-US To: Tom Lane Cc: pgsql-committers@lists.postgresql.org References: <3907902.1692890821@sss.pgh.pa.us> <3979066.1692910679@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <3979066.1692910679@sss.pgh.pa.us> X-GND-Sasl: adsend@dunslane.net List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------U27MlEsyQG2Ca05m5SZDXtRh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-08-24 Th 16:57, Tom Lane wrote: > Andrew Dunstan writes: >> On 2023-08-24 Th 11:27, Tom Lane wrote: >>> The v11 version of this patch is causing a compiler warning for me: >> Sorry about that, fixed. > Thanks! > >> While we're about it, let's also fix these warnings which are seen on my >> systems building releases 11 and 12: >> /home/andrew/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:481:22: >> warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized] >> /home/andrew/bf/root/REL_12_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:487:22: >> warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized] >> Maybe funcargtypes here should be initialized to { 0 } ? > Hm. It looks like we got rid of those warnings in v13 via dcb7d3caf: > > Author: Alvaro Herrera > Branch: master Release: REL_13_BR [dcb7d3caf] 2019-11-12 17:06:58 -0300 > > Have LookupFuncName accept NULL argtypes for 0 args > > I'm a little tempted to propose that a better solution is to > back-patch that patch. Removing the warning alone doesn't make > a very strong case for that, but there are other arguments: > > * Somebody might back-patch code relying on the newer convention; > > * All else being equal, it's better to keep the code in different > branches looking similar. > > I'm not sure if those arguments justify a back-patch instead of > the localized hack you suggest. > > Seems like overkill given the age of the surrounding code and the nearness to EOL of releases 11 and 12. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------U27MlEsyQG2Ca05m5SZDXtRh Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2023-08-24 Th 16:57, Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
On 2023-08-24 Th 11:27, Tom Lane wrote:
The v11 version of this patch is causing a compiler warning for me:

      
Sorry about that, fixed.
Thanks!

While we're about it, let's also fix these warnings which are seen on my 
systems building releases 11 and 12:

      
/home/andrew/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:481:22: 
warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized]
/home/andrew/bf/root/REL_12_STABLE/pgsql.build/../pgsql/src/backend/commands/foreigncmds.c:487:22: 
warning: ‘funcargtypes’ may be used uninitialized [-Wmaybe-uninitialized]

      
Maybe funcargtypes here should be initialized to  { 0 } ?
Hm.  It looks like we got rid of those warnings in v13 via dcb7d3caf:

    Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
    Branch: master Release: REL_13_BR [dcb7d3caf] 2019-11-12 17:06:58 -0300

    Have LookupFuncName accept NULL argtypes for 0 args

I'm a little tempted to propose that a better solution is to
back-patch that patch.  Removing the warning alone doesn't make
a very strong case for that, but there are other arguments:

* Somebody might back-patch code relying on the newer convention;

* All else being equal, it's better to keep the code in different
branches looking similar.

I'm not sure if those arguments justify a back-patch instead of
the localized hack you suggest.

			


Seems like overkill given the age of the surrounding code and the nearness to EOL of releases 11 and 12.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------U27MlEsyQG2Ca05m5SZDXtRh--