Hi, It's often said that the golden rule of WAL is that we must log the changes before actually doing the changes. However it seems to me that in _bt_delitems we're modifying the page (calling PageIndexMultiDelete) before actually logging what's going to happen. Why is this OK?
I see that we're holding the "super exclusive" lock on the page, but does this promise that the bgwriter won't write the page early? Another thing that I notice is that the buffer is not marked dirty until much later in btbulkdelete. But what if the buffer was dirty beforehand? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers