On Sat, Nov 20, 2021 at 3:22 PM Heikki Linnakangas <hlinn...@iki.fi> wrote: > But here's yet another idea: We could initialize RedoRecPtr and > doPageWrites in InitXLogInsert(). It would seem like a pretty natural > place for it.
I considered that, but it seemed like an abstraction violation to me, because that code is part of xloginsert.c, which is mostly concerned with assembly of write-ahead log records, not the associated shared-memory state. Also, I don't think there's any guarantee that the state in shared memory is initialized at the time we call that function, so we might just be copying uninitialized memory into other uninitialized memory. > PS. typo in patch v2: s/prepard/prepared/ Thanks, fixed. -- Robert Haas EDB: http://www.enterprisedb.com
v3-0001-Remove-InitXLOGAccess.patch
Description: Binary data