Hi!

Thanks for working on this.

> 18 дек. 2020 г., в 10:42, Kyotaro Horiguchi <horikyota....@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 lastNotifiedSeg somewhere 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 just hold 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.

Reply via email to