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

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-15 10:26:29
Message-ID: c96d3fa6-174c-2330-bee9-fce4894a8333@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 14.09.21 17:02, Tom Lane wrote:
> 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.

Yeah, pushed with the palloc0.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Yudianto Prasetyo 2021-09-15 10:38:08 Re: bugs or my fault
Previous Message Peter Smith 2021-09-15 10:16:38 Re: bugs or my fault