| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Re: Why clearing the VM doesn't require registering vm buffer in wal record |
| Date: | 2026-07-14 19:42:23 |
| Message-ID: | CAAKRu_ZMzhYdADNjpTzJaQbvH4cYr22-wSzuS=atMVtD_+W6yA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Jul 10, 2026 at 3:06 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> For 0003, I am much less confident. I've never written test
> infrastructure in Perl before. I used AI to help me write it, so I
> could really use review from someone experienced with adding TAP test
> utility functions. A few thoughts on it/questions:
I could still use review on 0003.
I hadn't checked CI before posting v4, and it caught a bug. Attached
v5 (based on REL_18_STABLE) fixes that bug. In heap_update(), when the
two heap pages' VM bits were on the same VM page and I was only
clearing the old VM bits, I was registering the VM buffer with the
wrong label. This made me wonder if I should change the logic in
heap_update() for setting vmbuffer_[new_]modified to handle the "same
VM page and both bits clear" case separately. It duplicates code but
it could be clearer. I am on the fence. I included a file
heap_update.diff that shows what that would look like.
I've also finished all branch versions of this. Each one's code
differs, but I've managed to keep the commit messages the same, which
should help release notes. Note that REL_19_STABLE bumps
XLOG_PAGE_MAGIC. This would keep us from having to maintain the
backwards compatibility code there, which I think is what we want.
Here are those branches.
- Melanie
17: https://github.com/melanieplageman/postgres/tree/17_vm-clear-logging
18: https://github.com/melanieplageman/postgres/tree/18_vm-clear-logging
19: https://github.com/melanieplageman/postgres/tree/19_vm-clear-logging
20 (master): https://github.com/melanieplageman/postgres/tree/20_vm-clear-logging
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Introduce-macros-for-WAL-block-reference-IDs-of-s.patch | text/x-patch | 16.0 KB |
| v5-0002-Fix-VM-clear-WAL-logging-by-registering-VM-blocks.patch | text/x-patch | 49.0 KB |
| v5-0003-Put-pg_combinebackup-debug-test-output-in-temp-fi.patch | text/x-patch | 4.2 KB |
| v5-0004-Test-that-VM-clear-registers-VM-buffers.patch | text/x-patch | 10.1 KB |
| heap_update.diff | text/x-patch | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nico Williams | 2026-07-14 19:52:27 | Re: document the dangers of granting TRIGGER or REFERENCES |
| Previous Message | Bharath Rupireddy | 2026-07-14 19:38:25 | Re: Report oldest xmin source when autovacuum cannot remove tuples |