Re: Race condition in InvalidateObsoleteReplicationSlots()

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Fujii Masao <fujii(at)postgresql(dot)org>
Subject: Re: Race condition in InvalidateObsoleteReplicationSlots()
Date: 2021-06-18 20:59:00
Message-ID: 202106182059.xesqcxergzdd@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v3-0001-Add-test-case-for-obsoleting-slot-with-active-wal.patch text/x-diff 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2021-06-18 21:05:45 Re: Race condition in InvalidateObsoleteReplicationSlots()
Previous Message Tomas Vondra 2021-06-18 20:31:43 Re: pg_stats and range statistics