From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition
Date: Thu, 03 Feb 2022 13:37:55 +0300
Message-ID: <0c5d710abcd92dc474b04ce802055a9f@postgrespro.ru> (raw)
In-Reply-To: <CAPmGK15oOhQGwp2z1+a+PTcz93Rbvq7Q8wtaXTOM6WZp2wbpLA@mail.gmail.com>
References: <CAPmGK166WGTskmduTR+N7enYDUGrtvmVLZPn0ak_gk3gcYTaCQ@mail.gmail.com>
<202202021442.hsxbhre2k533@alvherre.pgsql>
<CAPmGK15oOhQGwp2z1+a+PTcz93Rbvq7Q8wtaXTOM6WZp2wbpLA@mail.gmail.com>
On 2022-02-03 09:38, Etsuro Fujita wrote:
> I think it would be better to create a separate patch so that we test
> not only this but other EvalPlanQual stuff such as ForeignRecheck, so
> I applied the proposed patch to HEAD as well.
>
> Thanks!
>
> Best regards,
> Etsuro Fujita
Hello everyone in this thread!
Looks like gcc 11.2.0 is now reporting a warning in the branches
master/REL_14_STABLE, e.g. see CI
https://github.com/postgres/postgres/runs/5047720839:
[06:30:18.201] nodeForeignscan.c: In function ‘ForeignNext’:
[06:30:18.201] nodeForeignscan.c:47:13: error: unused variable ‘estate’
[-Werror=unused-variable]
[06:30:18.201] 47 | EState *estate = node->ss.ps.state;
[06:30:18.201] | ^~~~~~
Please could you fix it? E.g. like in the attached patch - the following
commands work for me with it:
$ ./configure && COPT=-Werror make world-bin
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.comAttachments:
[text/x-diff] diff_fix_ForeignNext_warning.patch (661B, ../0c5d710abcd92dc474b04ce802055a9f@postgrespro.ru/2-diff_fix_ForeignNext_warning.patch)
download | inline diff:diff --git a/src/backend/executor/nodeForeignscan.c b/src/backend/executor/nodeForeignscan.cindex 2c87b2e238a0da766b103728e791539db393adbf..0ff2064335ff5bd25f1531793de350310e969ba3 100644--- a/src/backend/executor/nodeForeignscan.c+++ b/src/backend/executor/nodeForeignscan.c@@ -44,7 +44,7 @@ ForeignNext(ForeignScanState *node)
TupleTableSlot *slot;
ForeignScan *plan = (ForeignScan *) node->ss.ps.plan;
ExprContext *econtext = node->ss.ps.ps_ExprContext;
- EState *estate = node->ss.ps.state;+ EState *estate PG_USED_FOR_ASSERTS_ONLY = node->ss.ps.state;
MemoryContext oldcontext;
/* Call the Iterate function in short-lived context */
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: m.polyakova@postgrespro.ru, etsuro.fujita@gmail.com, alvherre@alvh.no-ip.org, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition
In-Reply-To: <0c5d710abcd92dc474b04ce802055a9f@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