Re: Adding basic NUMA awareness - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Adding basic NUMA awareness
Date
Msg-id CAExHW5tj3rb5ox0jVQEWqAExu0cqAubj60BW2R_04mmbuG9XpA@mail.gmail.com
Whole thread Raw
In response to Re: Adding basic NUMA awareness  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
On Wed, Jul 2, 2025 at 6:06 PM Tomas Vondra <tomas@vondra.me> wrote:
>
> I'm not sure how you're rebuilding the freelist. Presumably it can
> contain buffers that are no longer valid (after shrinking). How is that
> handled to not break anything? I think the NUMA variant would do exactly
> the same thing, except that there's multiple lists.

Before shrinking the buffers, we walk the free list removing any
buffers that are going to be removed. When expanding, by linking the
new buffers in the order and then adding those to the already existing
free list. 0005 patch in [1] has the code for the same.

[1] https://www.postgresql.org/message-id/my4hukmejato53ef465ev7lk3sqiqvneh7436rz64wmtc7rbfj%40hmuxsf2ngov2

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Explicitly enable meson features in CI
Next
From: Steve Chavez
Date:
Subject: Re: PG 18 beta1 release notes misses mention of pg_noreturn