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

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: archive status ".ready" files may be created too early
Дата
Msg-id 60C21920-AB0D-43AF-BDB9-98E70153B654@yandex-team.ru
обсуждение исходный текст
Ответ на Re: archive status ".ready" files may be created too early  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
Список 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 по дате отправления:

Предыдущее
От: Luc Vlaming
Дата:
Сообщение: Re: Parallel Inserts in CREATE TABLE AS
Следующее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Parallel Inserts in CREATE TABLE AS