Re: tableam scan-API patch broke foreign key validation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Hadi Moshayedi <hadi(at)moshayedi(dot)net>
Subject: Re: tableam scan-API patch broke foreign key validation
Date: 2019-04-06 18:43:26
Message-ID: 7309.1554576206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2019-04-06 14:34:34 -0400, Tom Lane wrote:
>> Why should this code need to free anything? That'd be the responsibility
>> of the slot code, no?

> Well, not really. If a slot doesn't hold heap tuples internally,
> ExecFetchSlotHeapTuple() will return a fresh heap tuple (but signal so
> by setting *should_free = true if not NULL).

Ah, got it: ignoring should_free is indeed a potential issue here.

>> But clearly we need a test case here. I'll adjust Hadi's example
>> so that there's more than one tuple to check, and push it.

> Cool.

Sounds like a plan.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-04-06 19:21:21 Re: tableam scan-API patch broke foreign key validation
Previous Message Andres Freund 2019-04-06 18:38:34 Re: tableam scan-API patch broke foreign key validation