Re: archive status ".ready" files may be created too early

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "x4mmm(at)yandex-team(dot)ru" <x4mmm(at)yandex-team(dot)ru>, "a(dot)lubennikova(at)postgrespro(dot)ru" <a(dot)lubennikova(at)postgrespro(dot)ru>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "matsumura(dot)ryo(at)fujitsu(dot)com" <matsumura(dot)ryo(at)fujitsu(dot)com>, "masao(dot)fujii(at)gmail(dot)com" <masao(dot)fujii(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: archive status ".ready" files may be created too early
Date: 2021-07-31 16:10:44
Message-ID: 202107311610.jbpvq7kgmwc3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Jul-31, Bossart, Nathan wrote:

> On 7/30/21, 4:52 PM, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-07-31 17:05:02 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message David G. Johnston 2021-07-31 15:04:40 Re: Replace l337sp34k in comments.