On Mon, Aug 19, 2019 at 8:22 AM Amit Kapila <amit.kapil...@gmail.com> wrote: > One point to remember in this regard is that we do need to modify the > LSN in undo pages after writing WAL, so all the undo pages need to be > locked by that time or we again need to take the lock on them.
Uh, but a big part of the point of setting the LSN on the pages is to keep them from being written out before the corresponding WAL is flushed to disk. If you released and reacquired the lock, the page could be written out during the window in the middle. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company