| From: | Marina Polyakova <m(dot)polyakova(at)postgrespro(dot)ru> |
|---|---|
| To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
| Cc: | Karina Litskevich <litskevichkarina(at)gmail(dot)com>, Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, solaimurugan vellaipandiyan <drsolaimurugan(dot)v(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, g(dot)kashkin(at)postgrespro(dot)ru, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Function scan FDW pushdown |
| Date: | 2026-09-02 03:08:31 |
| Message-ID: | aae1a21ea301d306e23232a18440e281@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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(dot)polyakova(at)postgrespro(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ewan Young | 2026-09-02 03:29:25 | Re: Use pg_neg_s*_overflow() for open-coded negation overflow checks |
| Previous Message | Tom Lane | 2026-09-02 03:03:07 | Re: xid_wraparound/002_limits.pl might fail due to transient warning |