Re: archive status ".ready" files may be created too early - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: archive status ".ready" files may be created too early
Date
Msg-id 202107311610.jbpvq7kgmwc3@alvherre.pgsql
Whole thread Raw
In response to Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
List pgsql-hackers
On 2021-Jul-31, Bossart, Nathan wrote:

> On 7/30/21, 4:52 PM, "Alvaro Herrera" <alvherre@alvh.no-ip.org> wrote:

> > I noticed that XLogCtl->lastNotifiedSeg is protected by both the
> > info_lck and ArchNotifyLock.  I think it it's going to be protected by
> > the lwlock, then we should drop the use of the spinlock.
> 
> That seems reasonable to me.  This means that the lock is acquired at
> the end of every XLogWrite(),

Uhh, actually that there sounds really bad; it's going to be a serious
contention point.

Another option might be to make it an atomic.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Replace l337sp34k in comments.
Next
From: vignesh C
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions