From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: yi huang <yi.codeplayer@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: PostgreSQL12 crash bug report
Date: Wed, 31 Jul 2019 22:37:40 -0400
Message-ID: <5285.1564627060@sss.pgh.pa.us> (raw)
In-Reply-To: <20190801004000.3xis75ulpun4ha3p@alap3.anarazel.de>
References: <CAHU7rYZo_C4ULsAx_LAj8az9zqgrD8WDd4hTegDTMM1LMqrBsg@mail.gmail.com>
<20811.1564344681@sss.pgh.pa.us>
<28807.1564614449@sss.pgh.pa.us>
<20190801004000.3xis75ulpun4ha3p@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2019-07-31 19:07:29 -0400, Tom Lane wrote:
>> It's setting up an es_epqTupleSlot[] entry on the assumption that it
>> should have the same tupdesc as the output tuple that's to be rechecked.
>> This might accidentally fail to malfunction in single-table cases,
>> but it's quite broken for any join case --- in particular, for the
>> given test case, the scan tuple for the VALUES node surely doesn't have
>> the same tupdesc as the join result.
> To make sure I understand - the problem isn't the slot that we've
> created in nodeModifyTable.c via EvalPlanQualSlot(), right? It's the one
> we create in EvalPlanQualFetchRowMarks(), because we don't have a proper
> tuple type handy to create the slot with?
Yeah, I think nodeModifyTable.c is fine, because it always passes the
target relation. EvalPlanQualFetchRowMarks is not fine, and I'm unsure
about the call in nodeLockRows.c.
> Previously we simply didn't need to know the type during EPQ setup,
> because we only stored a HeapTuple anyway. And we'd know the appropriate
> tupledesc at the places that access the tuple.
Right. So we gotta refactor that somehow.
> One bigger change - but possibly one worth it - would be to basically
> move the work done in EvalPlanQualFetchRowMarks() to be done on-demand,
> at least for ROW_MARK_COPY.
Hm. Too tired to think that through right now.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, yi.codeplayer@gmail.com
Subject: Re: PostgreSQL12 crash bug report
In-Reply-To: <5285.1564627060@sss.pgh.pa.us>
References: <CAHU7rYZo_C4ULsAx_LAj8az9zqgrD8WDd4hTegDTMM1LMqrBsg@mail.gmail.com> <20811.1564344681@sss.pgh.pa.us> <28807.1564614449@sss.pgh.pa.us> <20190801004000.3xis75ulpun4ha3p@alap3.anarazel.de> <5285.1564627060@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