Re: YA race condition in 001_stream_rep.pl (was Re: pgsql: Allow using the updated tuple while moving it to a different par)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: YA race condition in 001_stream_rep.pl (was Re: pgsql: Allow using the updated tuple while moving it to a different par)
Date: 2018-07-18 21:42:40
Message-ID: 5237.1531950160@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> On Sat, Jul 14, 2018 at 11:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So the issue boils down to this: the test script is, effectively,
>> assuming that it's guaranteed that the walreceiver will send a feedback
>> message before it shuts down; but there is no such guarantee. Is this
>> a bug in the test script, or a bug in the walreceiver logic? I can
>> see the value of having such a guarantee, but I also think it would be
>> nigh impossible to make it a bulletproof guarantee. We could perhaps
>> add "XLogWalRcvSendHSFeedback(true)" somewhere closer to process exit,
>> but that might add more failure modes than it removes.
>>
>> Or we could change the test script to wait for feedback before it
>> issues the shutdown, but then I think the test is a bit pointless.

We've seen two more instances of this failure in the buildfarm since
this exchange (dragonet and flaviventris --- seems like Andres' menagerie
is particularly prone to it).

> Currently, neither the code nor our documentation suggests that we can
> expect HSFeedback before the shutdown, so it is better to adjust the
> test. If the sole purpose of the test is to test feedback after
> shutdown, then it is worth considering to remove the test altogether.

Hearing nobody speaking in favor of the other alternatives,
I've removed the test.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-07-19 00:06:25 pgsql: Fix re-parameterize of MergeAppendPath
Previous Message Tom Lane 2018-07-18 21:39:40 pgsql: Remove race-prone hot_standby_feedback test cases in 001_stream_

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-07-18 21:52:04 Re: Have an encrypted pgpass file
Previous Message Christophe Pettus 2018-07-18 21:37:22 Re: Have an encrypted pgpass file