From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use PageIndexTupleOverwrite() within nbtsort.c |
Date: | 2019-08-13 19:00:30 |
Message-ID: | CAH2-Wz=HUfMNK5adE9UJnN2-Fh7_5O76zG_DL6wKkiT-05_jEg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 6, 2019 at 8:30 AM Anastasia Lubennikova
<a(dot)lubennikova(at)postgrespro(dot)ru> wrote:
> Should we also update similar code in _bt_mark_page_halfdead()?
> I attached a new version of the patch with this change.
Pushed.
At first I thought that there might be a problem with doing the same
thing within _bt_mark_page_halfdead(), because we still won't use
PageIndexTupleOverwrite() in the corresponding recovery routine -- in
theory, that could break WAL consistency checking because the redo
routine works by reconstructing a half-deleted leaf page from scratch,
resulting in a logically equivalent though physically different page
(even after masking within btree_mask()). However, I eventually
decided that you had it right. Your _bt_mark_page_halfdead() change is
clearer overall and doesn't break WAL consistency checking in
practice, for reasons that are no less obvious than before.
Thanks!
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Igrishin | 2019-08-13 20:22:30 | Re: Small patch to fix build on Windows |
Previous Message | Peter Eisentraut | 2019-08-13 18:49:34 | Re: Fix runtime errors from -fsanitize=undefined |