Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffuDg-00033L-BO for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jul 2018 21:42:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffuDe-0001AT-9Q for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jul 2018 21:42:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffuDd-0001AM-Rt for pgsql-hackers@lists.postgresql.org; Wed, 18 Jul 2018 21:42:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffuDb-0008UH-Bk for pgsql-hackers@lists.postgresql.org; Wed, 18 Jul 2018 21:42:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6ILge17005238; Wed, 18 Jul 2018 17:42:40 -0400 From: Tom Lane To: Amit Kapila cc: Michael Paquier , PostgreSQL Hackers 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) In-reply-to: References: <20180712075909.GG7352@paquier.xyz> <11887.1531432634@sss.pgh.pa.us> <1922.1531592205@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Sun, 15 Jul 2018 16:39:50 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5236.1531950160.1@sss.pgh.pa.us> Date: Wed, 18 Jul 2018 17:42:40 -0400 Message-ID: <5237.1531950160@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Kapila writes: > On Sat, Jul 14, 2018 at 11:46 PM, Tom Lane 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