public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH 1/2] Fixes to index_get_partition()
Date: Thu, 5 Nov 2020 12:06:49 -0600
which was added at: a6da0047158b8a227f883aeed19eb7fcfbef11fb
free list in cases where there's no parent
use lsyscache: get_rel_relispartition()
---
src/backend/catalog/partition.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c
index 239ac017fa..4dfac39adf 100644
--- a/src/backend/catalog/partition.c
+++ b/src/backend/catalog/partition.c
@@ -170,13 +170,14 @@ index_get_partition(Relation partition, Oid indexId)
ReleaseSysCache(tup);
if (!ispartition)
continue;
- if (get_partition_parent(lfirst_oid(l)) == indexId)
+ if (get_partition_parent(partIdx) == indexId)
{
list_free(idxlist);
return partIdx;
}
}
+ list_free(idxlist);
return InvalidOid;
}
--
2.17.0
--6K2R/cS9K4qvcBNq
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0002-index_get_partition-use-lsyscache.patch"
view thread (13+ 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] Fixes to index_get_partition()
In-Reply-To: <no-message-id-1864715@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