($INBOX_DIR/description missing)
help / color / mirror / Atom feedFrom: Antonin Houska <[email protected]>
Subject: [PATCH 1/2] Minor cleanup in initialize_change_context().
Date: Wed, 1 Jul 2026 14:58:29 +0200
First, use makeNode() to create an instance of ResultRelInfo, like we do
elsewhere in the tree.
Second, pass NULL for the 'partition_root_rri' argument of InitResultRelInfo
instead of 0.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 4d177c868bb..c9b0c047477 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -3010,8 +3010,8 @@ initialize_change_context(ChangeContext *chgcxt,
/* Only initialize fields needed by ExecInsertIndexTuples(). */
chgcxt->cc_estate = CreateExecutorState();
- chgcxt->cc_rri = (ResultRelInfo *) palloc(sizeof(ResultRelInfo));
- InitResultRelInfo(chgcxt->cc_rri, relation, 0, 0, 0);
+ chgcxt->cc_rri = makeNode(ResultRelInfo);
+ InitResultRelInfo(chgcxt->cc_rri, relation, 0, NULL, 0);
ExecOpenIndices(chgcxt->cc_rri, false);
/*
--
2.52.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0002-Provide-the-executor-with-information-on-updated-col.patch
view thread (9+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/2] Minor cleanup in initialize_change_context().
In-Reply-To: <no-message-id-1869137@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox