From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Enforce foreign key correctly during cross-partition updates
Date: Sun, 20 Mar 2022 16:29:52 -0400
Message-ID: <1596411.1647808192@sss.pgh.pa.us> (raw)
In-Reply-To: <E1nVzfM-000bAp-9u@gemulon.postgresql.org>
References: <E1nVzfM-000bAp-9u@gemulon.postgresql.org>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Enforce foreign key correctly during cross-partition updates
skink is not too happy with this:
==2663594== VALGRINDERROR-BEGIN
==2663594== Conditional jump or move depends on uninitialised value(s)
==2663594== at 0x421526: ExecUpdateAct (nodeModifyTable.c:1855)
==2663594== by 0x4217A3: ExecUpdate (nodeModifyTable.c:2107)
==2663594== by 0x423027: ExecModifyTable (nodeModifyTable.c:2905)
==2663594== by 0x3F5CB8: ExecProcNodeFirst (execProcnode.c:463)
==2663594== by 0x3EE739: ExecProcNode (executor.h:259)
==2663594== by 0x3EE739: ExecutePlan (execMain.c:1633)
==2663594== by 0x3EE90E: standard_ExecutorRun (execMain.c:362)
==2663594== by 0x3EE9D4: ExecutorRun (execMain.c:306)
==2663594== by 0x5B3628: ProcessQuery (pquery.c:160)
==2663594== by 0x5B41E9: PortalRunMulti (pquery.c:1274)
==2663594== by 0x5B47AD: PortalRun (pquery.c:788)
==2663594== by 0x5B091D: exec_simple_query (postgres.c:1250)
==2663594== by 0x5B281B: PostgresMain (postgres.c:4520)
==2663594== Uninitialised value was created by a stack allocation
==2663594== at 0x421433: ExecUpdateAct (nodeModifyTable.c:1773)
==2663594==
==2663594== VALGRINDERROR-END
It reproduces easily for me under valgrind. I guess
ExecCrossPartitionUpdate must be failing to set
inserted_tuple or insert_destrel.
regards, tom lane
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, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Enforce foreign key correctly during cross-partition updates
In-Reply-To: <1596411.1647808192@sss.pgh.pa.us>
References: <E1nVzfM-000bAp-9u@gemulon.postgresql.org> <1596411.1647808192@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