Re: Fix BUG #17335: Duplicate result rows in Gather node - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix BUG #17335: Duplicate result rows in Gather node
Date
Msg-id 2258970.1643128355@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix BUG #17335: Duplicate result rows in Gather node  (Yura Sokolov <y.sokolov@postgrespro.ru>)
Responses Re: Fix BUG #17335: Duplicate result rows in Gather node
Re: Fix BUG #17335: Duplicate result rows in Gather node
List pgsql-hackers
Yura Sokolov <y.sokolov@postgrespro.ru> writes:
> В Вт, 25/01/2022 в 21:20 +1300, David Rowley пишет:
>> The reason I didn't think it was worth adding a new test was that no
>> tests were added in the original commit.  Existing tests did cover it,

> Existed tests didn't catched the issue. It is pitty fix is merged
> without test case it fixes.

I share David's skepticism about the value of a test case.  The
failure mode that seems likely to me is some other code path making
the same mistake, which a predetermined test would not catch.

Therefore, what I think could be useful is some very-late-stage
assertion check (probably in createplan.c) verifying that the
child of a Gather is parallel-aware.  Or maybe the condition
needs to be more general than that, but anyway the idea is for
the back end of the planner to verify that we didn't build a
silly plan.

            regards, tom lane



pgsql-hackers by date:

Previous
From: tushar
Date:
Subject: Re: refactoring basebackup.c
Next
From: Alexander Pyhalov
Date:
Subject: Re: Foreign join search stops on the first try