Re: subplan resets wrong hashtable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: subplan resets wrong hashtable
Date
Msg-id 30426.1581372511@sss.pgh.pa.us
Whole thread Raw
In response to Re: subplan resets wrong hashtable  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: subplan resets wrong hashtable
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> On Sun, Feb 09, 2020 at 08:01:26PM -0800, Andres Freund wrote:
>> Ugh, that indeed looks wrong. Did you check whether it can actively
>> cause wrong query results? If so, did you do theoretically, or got to a
>> query returning wrong results?

> Actually .. I can "theoretically" prove that there's no wrong results from that
> patch...since in that file it has no effect, the tested variables being zeroed
> few lines earlier:

Right.  So the incorrect ResetTupleHashTable call is unreachable
(and a look at the code coverage report confirms that).  The whole
thing obviously is a bit hasty and unreviewed, but it doesn't have
a live bug AFAICS ... or at least, if there's a bug, it's a memory
leakage issue across repeat executions, not a crash hazard.  I'm
not too clear on whether the context reset just above those pointer
assignments will get rid of all traces of the old hash tables,
but it sort of looks like it might not anymore.

Anyway, not going to hold up the releases for a fix for this.
We've lived with it for a year, so it can wait another quarter.

            regards, tom lane




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: walreceiver uses a temporary replication slot by default
Next
From: Quan Zongliang
Date:
Subject: Re: Restore replication settings when modifying a field type