pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Karina Litskevich <litskevichkarina@gmail.com>
Cc: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Cc: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Cc: solaimurugan vellaipandiyan <drsolaimurugan.v@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>
Cc: g.kashkin@postgrespro.ru, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Function scan FDW pushdown
Date: Wed, 02 Sep 2026 06:08:31 +0300
Message-ID: <aae1a21ea301d306e23232a18440e281@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfduE7MivD8SzpoDFrOahpqtc-UGpEpZ9BXmUGjL2XbFbcQ@mail.gmail.com>
References: <202508051955.sao7ucalcce7@alvherre.pgsql>
	<e3af56f9b2f1bd9fdf12aff6ca25b18d@postgrespro.ru>
	<c42480257bc3350c20749f6c0362826c@postgrespro.ru>
	<CAHEL7KQU_=iKQU3dGMV+6vOBWkh=i5g7speEU=VVziRu=3v1Tw@mail.gmail.com>
	<b91abe323f12f4210a53feb1ead3ac0d@postgrespro.ru>
	<CAPpHfdvz=ahOKEnu4OZ_z3JjQQVddgsNti4FX8SmAKCxmh80BQ@mail.gmail.com>
	<7e2abeb3ea9bc7ca024f4e457dce33f5@postgrespro.ru>
	<CAPpHfduVg4-6U=oDyBLGV53nU6bVfF+3yqVo9s09TpRSjgMDWw@mail.gmail.com>
	<b02d45f5484fedb7e32acbed44abb8f6@postgrespro.ru>
	<CAPpHfdvkPk0dLFbF-2DG7hV5zKNPcdyV4Xzj99chYiqAFtvh_Q@mail.gmail.com>
	<e0765907e8073c105c76134b5eb6b39b@postgrespro.ru>
	<CAPpHfduLKwM=Jj-0q+vWiwNOLYfhJQFs+c-YPF8=voPD1M_trQ@mail.gmail.com>
	<214e7cb76a9f142a08246660a649ca0b@postgrespro.ru>
	<CAPpHfdtxrvDkGsdxEnaGB4f2apHnHHS0BPySYgZ39gFoBt1F=g@mail.gmail.com>
	<2dcab8ff39f8c6f88ecfa3cfb54d8180@postgrespro.ru>
	<CAPpHfdvhMtkY-MJ5M3_JjN5wPA7_ZoYw_vmdm97ZEvQ33rCT0g@mail.gmail.com>
	<2828ce456ded46a41cd225a1cc393526@postgrespro.ru>
	<CAPpHfdv99rqDdZOmo6onNaFkvW_ETj0yVW90yRpNxVtM1iFgWg@mail.gmail.com>
	<c6de48bf1f09e2c1a22b5f680d4d9099@postgrespro.ru>
	<CAPpHfdubqtP-hMGO7rstR2iUCdq=jOWwy=9p0cdJZHi0BMpJoQ@mail.gmail.com>
	<CAO6_XqrGH2NRe0oFx_00nLXra1UZezd3jbS9pgoRhZtgzHD9gg@mail.gmail.com>
	<f29ef461267372c23e06ad9ad687f395@postgrespro.ru>
	<CACiT8iamoL-=792e6JK2uCVvwDhfCg7DXHhvqN0P33jhGg2-8A@mail.gmail.com>
	<f966e42da14169138b01cdd564b0bf9e@postgrespro.ru>
	<CAPpHfduE7MivD8SzpoDFrOahpqtc-UGpEpZ9BXmUGjL2XbFbcQ@mail.gmail.com>

The attached patch fixes the warning with CFLAGS=-Og and gcc-13 
described above, and removes outer_is_function/inner_is_function 
variables which were used only once. Thank you!

On 2026-09-02 01:11, Alexander Korotkov wrote:
> On Sat, Aug 29, 2026 at 10:21 PM Marina Polyakova
> <m.polyakova@postgrespro.ru> wrote:
>> I got this warning with gcc-13 ([1], [2]) and CFLAGS=-Og (both -O0 and
>> -O1 work fine). Both gcc-12 [3] and gcc-14 [4] work fine with
>> CFLAGS=-Og. IMO this compiler warning is strange because the attached
>> patch with a simple code reordering fixes it.
>> 
>> [1] 
>> https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-13.3.0
>> [2] 
>> https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-13.4.0
>> [3] Ubuntu 12.3.0-1ubuntu1~22.04.3 12.3.0
>> [4] 
>> https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-14.4.0
>> 
>> On 2026-08-28 16:18, Karina Litskevich wrote:
>> > Hi!
>> >
>> > Here is another compilation warning that seems to be caused by this
>> > patch.
>> >
>> > postgres_fdw.c: In function ‘foreign_join_ok’:
>> > postgres_fdw.c:7135:46: error: ‘fpinfo_i’ may be used
>> > uninitialized [-Werror=maybe-uninitialized]
>> >  7135 |         if (fpinfo_o->local_conds || fpinfo_i->local_conds)
>> >       |                                      ~~~~~~~~^~~~~~~~~~~~~
>> > postgres_fdw.c:7044:28: note: ‘fpinfo_i’ was declared here
>> >  7044 |         PgFdwRelationInfo *fpinfo_i;
>> >       |                            ^~~~~~~~
> 
> Yes, compiler may fail to trace invariants of
> inner_is_function/outer_is_function flags usage. I suggest to remove
> them altogether.  See the attached patch.  I think this code also
> becomes a bit more readable.
> 
> ------
> Regards,
> Alexander Korotkov
> Supabase

-- 
Best regards,
Marina Polyakova
Postgres Professional: http://www.postgrespro.com






view thread (36+ messages)  latest in thread

Message-ID: <aae1a21ea301d306e23232a18440e281@postgrespro.ru>
Permalink:  ../aae1a21ea301d306e23232a18440e281@postgrespro.ru/
Also on:    postgresql.org/message-id/aae1a21ea301d306e23232a18440e281@postgrespro.ru

 · 

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-hackers@postgresql.org
  Cc: m.polyakova@postgrespro.ru, aekorotkov@gmail.com, litskevichkarina@gmail.com, a.pyhalov@postgrespro.ru, anthonin.bonnefoy@datadoghq.com, drsolaimurugan.v@gmail.com, alvherre@kurilemu.de, ashutosh.bapat.oss@gmail.com
  Subject: Re: Function scan FDW pushdown
  In-Reply-To: <aae1a21ea301d306e23232a18440e281@postgrespro.ru>
  References: <202508051955.sao7ucalcce7@alvherre.pgsql> <CAPpHfduLKwM=Jj-0q+vWiwNOLYfhJQFs+c-YPF8=voPD1M_trQ@mail.gmail.com> <214e7cb76a9f142a08246660a649ca0b@postgrespro.ru> <CAPpHfdtxrvDkGsdxEnaGB4f2apHnHHS0BPySYgZ39gFoBt1F=g@mail.gmail.com> <2dcab8ff39f8c6f88ecfa3cfb54d8180@postgrespro.ru> <CAPpHfdvhMtkY-MJ5M3_JjN5wPA7_ZoYw_vmdm97ZEvQ33rCT0g@mail.gmail.com> <2828ce456ded46a41cd225a1cc393526@postgrespro.ru> <CAPpHfdv99rqDdZOmo6onNaFkvW_ETj0yVW90yRpNxVtM1iFgWg@mail.gmail.com> <c6de48bf1f09e2c1a22b5f680d4d9099@postgrespro.ru> <CAPpHfdubqtP-hMGO7rstR2iUCdq=jOWwy=9p0cdJZHi0BMpJoQ@mail.gmail.com> <CAO6_XqrGH2NRe0oFx_00nLXra1UZezd3jbS9pgoRhZtgzHD9gg@mail.gmail.com> <f29ef461267372c23e06ad9ad687f395@postgrespro.ru> <CACiT8iamoL-=792e6JK2uCVvwDhfCg7DXHhvqN0P33jhGg2-8A@mail.gmail.com> <f966e42da14169138b01cdd564b0bf9e@postgrespro.ru> <CAPpHfduE7MivD8SzpoDFrOahpqtc-UGpEpZ9BXmUGjL2XbFbcQ@mail.gmail.com> <aae1a21ea301d306e23232a18440e281@postgrespro.ru>

* 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