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

From Andrey Borodin
Subject Re: archive status ".ready" files may be created too early
Date
Msg-id 60C21920-AB0D-43AF-BDB9-98E70153B654@yandex-team.ru
Whole thread Raw
In response to Re: archive status ".ready" files may be created too early  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
List pgsql-hackers
Hi!

Thanks for working on this.

> 18 дек. 2020 г., в 10:42, Kyotaro Horiguchi <horikyota.ntt@gmail.com> написал(а):
>
> I noticed that we can cause the continuation record flushed
> immedately.

I've took a look into the code and want to share some thoughts.

1. Maybe we could tend to avoid interlacing field protected by different locks in XLogCtlData? We can place
lastNotifiedSegsomewhere near field that is protected by WALWriteLock. I'm not sure it's useful idea. 
2. In XLogInsertRecord() we release &XLogCtl->info_lck just to compute few bytes. And possibly aquire it back. Maybe
justhold the lock a little longer? 
3. Things that are done by GetLastNotifiedSegment() could just be atomic read? I'm not sure it's common practice.

Thanks!

Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Luc Vlaming
Date:
Subject: Re: Parallel Inserts in CREATE TABLE AS
Next
From: "Hou, Zhijie"
Date:
Subject: RE: Parallel Inserts in CREATE TABLE AS