Re: Simplify VM counters in vacuum code - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Simplify VM counters in vacuum code
Date
Msg-id CAAKRu_YmNd3yzAGpaKrmfsNT3t9KULbgkUQe2_r-btVzdLYj3A@mail.gmail.com
Whole thread Raw
In response to Re: Simplify VM counters in vacuum code  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Tue, Jun 24, 2025 at 9:17 AM Melanie Plageman
<melanieplageman@gmail.com> wrote:
>
> On Tue, Jun 24, 2025 at 4:01 AM Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:
>
> > I think we do not need to check visibility of the page here, as we
> > already know that page was not all-visible due to LP_DEAD items. We
> > can simply increment the vacrel->vm_new_visible_pages and check
> > whether the page is frozen.
>
> My idea with the assert was sort of to codify the expectation that the
> page couldn't have been all-visible because of the dead items. But
> perhaps that is obvious. But you are right that the if statement is
> not needed. Perhaps I ought to remove the asserts as they may be more
> confusing than helpful.

Thinking about this more, I think it is better without the asserts.
I've done this in attached v3.

- Melanie

Attachment

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: BackendKeyData is mandatory?
Next
From: Christoph Berg
Date:
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view