pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: sait.nisanci@microsoft.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17158: Distinct ROW fails with Postgres 14
Date: Tue, 14 Sep 2021 11:02:13 -0400
Message-ID: <594111.1631631733@sss.pgh.pa.us> (raw)
In-Reply-To: <2f0f926d-23c9-2ded-4032-dee85be733dc@enterprisedb.com>
References: <17158-8a2ba823982537a4@postgresql.org>
	<CAApHDvp0w_5YY=7pxPkymtv7Oc0cGS=+jtiBvXrfcM6gLjT5Pg@mail.gmail.com>
	<bc0ec85a-68cf-1b99-e80c-ee0c55b936db@enterprisedb.com>
	<496046.1629843371@sss.pgh.pa.us>
	<c182f5c8-fdf3-80a0-fa43-4ed7e87d4d47@enterprisedb.com>
	<2021952.1630442634@sss.pgh.pa.us>
	<7fb17b3d-13dc-fc28-17ce-9c302d676bd8@enterprisedb.com>
	<4519d7da-7402-cff3-d577-0bc8511e0c9a@enterprisedb.com>
	<4092959.1631302070@sss.pgh.pa.us>
	<2f0f926d-23c9-2ded-4032-dee85be733dc@enterprisedb.com>

Peter Eisentraut <peter.eisentraut@enterprisedb.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





view thread (14+ messages)  latest in thread

Message-ID: <594111.1631631733@sss.pgh.pa.us>
Permalink:  ../594111.1631631733@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/594111.1631631733@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, dgrowleyml@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17158: Distinct ROW fails with Postgres 14
  In-Reply-To: <594111.1631631733@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox