| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Cc: | Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Adding vacuum test case of setting the VM when heap page is unmodified |
| Date: | 2025-12-18 00:35:53 |
| Message-ID: | CAAKRu_Z7-1s=0iEs5VBB+2JwL8aNLUhe=o4dPXdh3FXrNw1Urw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Dec 17, 2025 at 2:29 PM Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
>
> I did run a test and this indeed triggers assertion if somebody writes
> something like [0]. Code at [0] works (although never testes) only
> because is passed
> InvalidXLogRecPtr as recptr to visibilitymap_set. Maybe it is worth to
> add comment nearby this
>
> /*
> * Avoid relying on all_visible_according_to_vm as a proxy for the
> * page-level PD_ALL_VISIBLE bit being set, since it might have become
> * stale -- even when all_visible is set
> */
>
> To explain why is it OK to make conditional MarkBufferDirty?
I actually propose we never do that (because the buffer should always
be dirty anyway, and it isn't too expensive to mark an already dirty
buffer dirty again). I've proposed a refactoring of this code, which
includes comments about this expectation in 0001 on this thread [1]
(which you are also participating in).
I proposed the test separately since it seems independently valuable
but 0001 in [1] contains the same test as the one in this thread
actually.
- Melanie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2025-12-18 00:36:23 | Re: Add sanity check for duplicate enum values in GUC definitions |
| Previous Message | Andres Freund | 2025-12-18 00:30:04 | Re: Report oldest xmin source when autovacuum cannot remove tuples |