Re: Race condition in InvalidateObsoleteReplicationSlots() - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Race condition in InvalidateObsoleteReplicationSlots()
Date
Msg-id 202106182059.xesqcxergzdd@alvherre.pgsql
Whole thread Raw
In response to Re: Race condition in InvalidateObsoleteReplicationSlots()  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Race condition in InvalidateObsoleteReplicationSlots()
Re: Race condition in InvalidateObsoleteReplicationSlots()
List pgsql-hackers
On 2021-Jun-11, Álvaro Herrera wrote:

> I tried hard to make this stable, but it just isn't (it works fine one
> thousand runs, then I grab some coffee and run it once more and that one
> fails.  Why?  that's not clear to me).  Attached is the last one I have,
> in case somebody wants to make it better.  Maybe there's some completely
> different approach that works better, but I'm out of ideas for now.

It occurred to me that this could be made better by sigstopping both
walreceiver and walsender, then letting only the latter run; AFAICS this
makes the test stable.  I'll register this on the upcoming commitfest to
let cfbot run it, and if it looks good there I'll get it pushed to
master.  If there's any problem I'll just remove it before beta2 is
stamped.

-- 
Álvaro Herrera       Valdivia, Chile

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: pg_stats and range statistics
Next
From: Álvaro Herrera
Date:
Subject: Re: Race condition in InvalidateObsoleteReplicationSlots()