A trivial fix on extensiblenode
Started by Kouhei Kaigaialmost 10 years ago2 messages
Hello,
RegisterExtensibleNodeMethods() initializes its hash table
with keysize=NAMEDATALEN, instead of EXTNODENAME_MAX_LEN.
The attached patch fixes it.
Thanks,
--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai@ak.jp.nec.com>
Attachments:
pgsql-v9.6-trivial-fix-extensiblenode.patchapplication/octet-stream; name=pgsql-v9.6-trivial-fix-extensiblenode.patchDownload
src/backend/nodes/extensible.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/nodes/extensible.c b/src/backend/nodes/extensible.c
index 8fb4767..e78a12b 100644
--- a/src/backend/nodes/extensible.c
+++ b/src/backend/nodes/extensible.c
@@ -45,7 +45,7 @@ RegisterExtensibleNodeMethods(const ExtensibleNodeMethods *methods)
HASHCTL ctl;
memset(&ctl, 0, sizeof(HASHCTL));
- ctl.keysize = NAMEDATALEN;
+ ctl.keysize = EXTNODENAME_MAX_LEN;
ctl.entrysize = sizeof(ExtensibleNodeEntry);
extensible_node_methods = hash_create("Extensible Node Methods",
100, &ctl, HASH_ELEM);
Re: A trivial fix on extensiblenode
On Mon, Feb 29, 2016 at 4:07 AM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
RegisterExtensibleNodeMethods() initializes its hash table
with keysize=NAMEDATALEN, instead of EXTNODENAME_MAX_LEN.The attached patch fixes it.
Oops.
Thanks, committed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers