Re: relfilenode statistics - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: relfilenode statistics
Date
Msg-id Z0nbomp2e/L30WDA@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: relfilenode statistics  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: relfilenode statistics
List pgsql-hackers
Hi,

On Fri, Nov 29, 2024 at 11:23:12AM +0500, Kirill Reshke wrote:
> On Tue, 5 Nov 2024 at 11:06, Bertrand Drouvot
> <bertranddrouvot.pg@gmail.com> wrote:
> >
> >
> > Does it sound ok to you to move with the above principal? (I'm +1 on it).
> >
> 
> Hi! I looked through this thread.

Thanks for looking at it!

> Looks like we are still awaiting a patch which stores more counters
> (n_dead_tup, ... etc) into relfilenode stats.

Yes.

> If we don’t have the relation OID when writing buffers out, can we
> just store oid to buffertag mapping somewhere and use it?

Do you mean add the relation OID into the BufferTag? While that could probably
be done from a technical point of view (with probably non negligible amount
of refactoring), I can see those cons:

1. We'd increase the BufferDesc size and approaching the 64 bytes limit (cache
line size) that we don't want to exceed (see comment above BufferDesc definition)
2. Probably lot of refactoring
3. This new member would be there "only" for stats and reporting purpose as
it is not needed at all for buffer related operations
4. 3. seems to indicate that's not the right place

Then I think 1. and 2. are not worth it given 3. and 4.

There is probably other cons too though.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Marcos Pegoraro
Date:
Subject: Re: altering a column's collation leaves an invalid foreign key
Next
From: Tomas Vondra
Date:
Subject: Re: Guidance Needed for Testing PostgreSQL Patch (CF-5044)