Re: Pg18 Recursive Crash - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Pg18 Recursive Crash
Date
Msg-id 2543667.1734483723@sss.pgh.pa.us
Whole thread Raw
In response to Re: Pg18 Recursive Crash  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Pg18 Recursive Crash
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I've pushed the patch now.

So I tried adapting my patch to not make a copy of the input slot,
and it didn't work: I was still getting assertion failures about
the slot not being a MinimalTupleSlot as expected.  On investigation
it appears your patch did not fully adjust BuildTupleHashTableExt
for variable input-slot type.  You need the attached as well.

I'm not sure why the existing regression tests didn't catch this.
But it may not be worth searching for a test case, because my patch
will be one ...

            regards, tom lane

diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 4a8f72305c..7491e53c03 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -236,9 +236,9 @@ BuildTupleHashTableExt(PlanState *parent,
                                                         hash_iv);

     /* build comparator for all columns */
-    /* XXX: should we support non-minimal tuples for the inputslot? */
     hashtable->tab_eq_func = ExecBuildGroupingEqual(inputDesc, inputDesc,
-                                                    &TTSOpsMinimalTuple, &TTSOpsMinimalTuple,
+                                                    inputOps,
+                                                    &TTSOpsMinimalTuple,
                                                     numCols,
                                                     keyColIdx, eqfuncoids, collations,
                                                     allow_jit ? parent : NULL);

pgsql-hackers by date:

Previous
From: Robert Pang
Date:
Subject: Back-patch of: avoid multiple hard links to same WAL file after a crash
Next
From: Andreas Karlsson
Date:
Subject: Re: Add CASEFOLD() function.