From: Alvaro Herrera Date: Sun, 20 Mar 2022 21:10:24 +0000 (+0100) Subject: Blind fix for uninitialized memory bug in ba9a7e392171 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2d655a08d532feed356222a8b1e427561dc7a883;p=users%2Frhaas%2Fpostgres.git Blind fix for uninitialized memory bug in ba9a7e392171 Valgrind animal skink shows a crash in this new code. I couldn't reproduce the problem locally, but going by blind code inspection, initializing insert_destrel should be sufficient to fix the problem. --- diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 5e4226abe2..701fe05296 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -1820,7 +1820,7 @@ lreplace:; if (partition_constraint_failed) { TupleTableSlot *inserted_tuple; - ResultRelInfo *insert_destrel; + ResultRelInfo *insert_destrel = NULL; /* * ExecCrossPartitionUpdate will first DELETE the row from the