Additional write barrier in AdvanceXLInsertBuffer().

First, mark the xlblocks member with InvalidXLogRecPtr, then issue a
write barrier, then initialize it. That ensures that the xlblocks
member doesn't appear valid while the contents are being initialized.

In preparation for reading WAL buffer contents without a lock.

Author: Bharath Rupireddy
Discussion: 
https://postgr.es/m/calj2acvffmfqd5olzzsqqzwfxijqd-ndx0_317vep6fub31...@mail.gmail.com
Reviewed-by: Andres Freund

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/766571be16598b401b5527208847145edc6be1f4

Modified Files
--------------
src/backend/access/transam/xlog.c | 8 ++++++++
1 file changed, 8 insertions(+)

Reply via email to