Re: Add a write_to_file member to PgStat_KindInfo - Mailing list pgsql-hackers

From Nazir Bilal Yavuz
Subject Re: Add a write_to_file member to PgStat_KindInfo
Date
Msg-id CAN55FZ0k3jLe5vExkqw3Lrn5bWqdaU61Rqd8vUeQs=ZzO=CgZw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

Thank you for working on this!

On Wed, 20 Nov 2024 at 17:05, Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> Hi hackers,
>
> Working on [1] produced the need to give to the statistics the ability to
> decide whether or not they want to be written to the file on disk.
>
> Indeed, there is no need to write the per backend I/O stats to disk (no point to
> see stats for backends that do not exist anymore after a re-start), so $SUBJECT.

I think this is a good idea. +1 for the $SUBJECT.

> This new member could also be useful for custom statistics, so creating this
> dedicated thread.
>
> The attached patch also adds a test in the fixed injection points statistics.
> It does not add one for the variable injection points statistics as I think adding
> one test is enough (the code changes are simple enough).

There are duplicated codes in the injection_stats_fixed.c file. Do you
think that 'modifying existing functions to take an argument to
differentiate whether the kind is default or no-write' would be
better?

--
Regards,
Nazir Bilal Yavuz
Microsoft



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: cannot freeze committed xmax
Next
From: Yogesh Sharma
Date:
Subject: Re: allow changing autovacuum_max_workers without restarting