Re: YA race condition in 001_stream_rep.pl (was Re: pgsql: Allow using the updated tuple while moving it to a different par)
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-07-15T11:09:50Z
Lists: pgsql-hackers
On Sat, Jul 14, 2018 at 11:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I wrote: > > I can reproduce the failure pretty reliably with a hack like the one > attached, which makes it unlikely that the walreceiver will send a > feedback message instantly when it gets the SIGHUP. > > 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. > 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. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Remove race-prone hot_standby_feedback test cases in 001_stream_rep.pl.
- ade18277a0dc 11.0 landed
- a360f952ff02 12.0 landed
- 5c513db12c29 10.5 landed
-
Allow using the updated tuple while moving it to a different partition.
- 40ca70ebcc9d 12.0 cited
-
Allow UPDATE to move rows between partitions.
- 2f178441044b 11.0 cited