On 8/17/21, 2:13 PM, "[email protected]" <[email protected]> wrote: > On 2021-Aug-17, Bossart, Nathan wrote: > >> The main reason for registering the boundaries in XLogInsertRecord() >> is that it has the required information about the WAL record >> boundaries. I do not think that XLogWrite() has this information. > > Doh, of course. So, why isn't it that we call Register in > XLogInsertRecord, and Notify in XLogWrite?
We do. However, we also call NotifySegmentsReadyForArchive() in XLogInsertRecord() to handle the probably-unlikely scenario that the flush pointer has already advanced past the to-be-registered boundary. This ensures that the .ready files are created as soon as possible. Nathan
