From cd0e4a89c26469ec9b25951f693c08ab5aa6ac7f Mon Sep 17 00:00:00 2001 From: Varik Matevosyan Date: Sun, 24 Sep 2023 19:04:00 +0400 Subject: [PATCH] Fix ExecStoreHeapTuple for pg11 --- scripts/extern_defined.sh | 2 ++ src/hnsw/build.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/extern_defined.sh b/scripts/extern_defined.sh index 3ef2b6324..806b801ca 100755 --- a/scripts/extern_defined.sh +++ b/scripts/extern_defined.sh @@ -39,6 +39,8 @@ PG_BIN=$(pg_config --bindir)/postgres nm -D $PG_BIN | grep " T " | awk '{print $3}' | sed -e 's/@.*$//p' # global bss symbol in postgres nm -D $PG_BIN | grep " B " | awk '{print $3}' | sed -e 's/@.*$//p' +# postgres Initialized data (bbs), global symbols +nm -D $PG_BIN | grep " D " | awk '{print $3}' | sed -e 's/@.*$//p' # postgres weak symbols nm -D $PG_BIN | grep " w " | awk '{print $2}' | sed -e 's/@.*$//p' diff --git a/src/hnsw/build.c b/src/hnsw/build.c index 8081f36c8..a4f13b8d4 100644 --- a/src/hnsw/build.c +++ b/src/hnsw/build.c @@ -159,7 +159,11 @@ static int GetArrayLengthFromExpression(Expr *expression, Relation heap, HeapTup // Build the expression state for your expression exprstate = ExecPrepareExpr(expression, estate); - ExecStoreHeapTuple(tuple, slot, true); +#if PG_VERSION_NUM >= 120000 + ExecStoreHeapTuple(tuple, slot, false); +#else + ExecStoreTuple(tuple, slot, InvalidBuffer, false); +#endif // Set up the tuple for the expression evaluation econtext->ecxt_scantuple = slot;