Re: BUG #17158: Distinct ROW fails with Postgres 14

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, sait(dot)nisanci(at)microsoft(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17158: Distinct ROW fails with Postgres 14
Date: 2021-09-14 15:02:13
Message-ID: 594111.1631631733@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> On 10.09.21 21:27, Tom Lane wrote:
>> Perhaps it'd work to put the phony entry into fcinfo->flinfo->fn_mcxt
>> instead of CacheMemoryContext.

> Ok, the attached patch fixes the valgrind error.

Looks roughly sane to me. I'm of two minds about whether you
ought to change the palloc to palloc0. We'd have taken much
longer to notice this problem if palloc0 had been used; but
from any standpoint other than "will valgrind catch it", it
seems like zeroing the fake typcache entry would be safer.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-09-14 21:56:58 Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events
Previous Message Peter Eisentraut 2021-09-14 14:39:39 Re: BUG #17158: Distinct ROW fails with Postgres 14