pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve performance of repeated CALLs within plpgsql procedures.
Date: Tue, 26 Jan 2021 14:06:08 -0500
Message-ID: <2277317.1611687968@sss.pgh.pa.us> (raw)
In-Reply-To: <2167663.1611674210@sss.pgh.pa.us>
References: <E1l4F1z-0000cN-Lx@gemulon.postgresql.org>
	<YA/09gVged25bRsI@paquier.xyz>
	<2167663.1611674210@sss.pgh.pa.us>

I wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Tue, Jan 26, 2021 at 03:28:39AM +0000, Tom Lane wrote:
>>> Improve performance of repeated CALLs within plpgsql procedures.

>> lapwing is generating a warning here:

> Yeah, I saw that last night.  It's weird, because that patch surely
> did not change anything that should affect defined-ness of retval.
> I plan to fix it by just immediately initializing retval, but I want
> to wait a little bit, because I'm curious to see if any other compilers
> complain.

Did that now.  A survey of the buildfarm finds all of these animals
warning about retval, in addition to lapwing:

 curculio      | 2021-01-26 11:30:20 | pl_handler.c:228: warning: 'retval' may be used uninitialized in this function
 damselfly     | 2021-01-26 11:30:28 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 locust        | 2021-01-26 11:14:42 | pl_handler.c:228: warning: 'retval' may be used uninitialized in this function
 mantid        | 2021-01-26 11:07:08 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 prairiedog    | 2021-01-25 13:19:02 | pl_handler.c:227: warning: 'retval' may be used uninitialized in this function
 prion         | 2021-01-26 10:03:14 | /home/ec2-user/bf/root/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 rhinoceros    | 2021-01-26 09:52:17 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 sidewinder    | 2021-01-26 11:45:19 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 skate         | 2021-01-26 09:06:47 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]
 takin         | 2021-01-26 08:51:19 | pl_handler.c:303:2: warning: 'retval' may be used uninitialized in this function [-Wmaybe-uninitialized]

Some of these may predate this commit (the one from prairiedog
clearly does).  I also noted a few animals complaining about -Wclobber:

 francolin     | 2021-01-14 02:20:10 | /home/andres/build/buildfarm-francolin/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:227:9: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
 piculet       | 2021-01-14 04:16:30 | /home/andres/build/buildfarm-piculet/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:227:9: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
 rorqual       | 2021-01-14 02:20:10 | /home/andres/build/buildfarm-atomics-spinlocks/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:227:9: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
 serinus       | 2021-01-26 09:44:08 | /home/bf/build/buildfarm-serinus/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:227:16: warning: variable 'procedure_resowner' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
 serinus       | 2021-01-26 09:44:08 | /home/bf/build/buildfarm-serinus/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:228:9: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
 skink         | 2021-01-13 19:41:43 | /home/andres/build/buildfarm/HEAD/pgsql.build/../pgsql/src/pl/plpgsql/src/pl_handler.c:227:9: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]

and made an effort to silence that too.

			regards, tom lane





view thread (4+ messages)

Message-ID: <2277317.1611687968@sss.pgh.pa.us>
Permalink:  ../2277317.1611687968@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2277317.1611687968@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz
  Subject: Re: pgsql: Improve performance of repeated CALLs within plpgsql procedures.
  In-Reply-To: <2277317.1611687968@sss.pgh.pa.us>
  References: <E1l4F1z-0000cN-Lx@gemulon.postgresql.org> <YA/09gVged25bRsI@paquier.xyz> <2167663.1611674210@sss.pgh.pa.us> <2277317.1611687968@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox