Re: Add a write_to_file member to PgStat_KindInfo

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add a write_to_file member to PgStat_KindInfo
Date: 2024-11-21 06:32:03
Message-ID: Zz7T47nHwYgeYwOe@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Nov 21, 2024 at 10:01:07AM +0900, Michael Paquier wrote:
> On Wed, Nov 20, 2024 at 05:13:18PM +0000, Bertrand Drouvot wrote:
> > I don't have a strong opinion for this particular case here (I think the code
> > is harder to read but yeah there is some code reduction): so I'm fine with
> > v2 too.
>
> Your patch adding backend statistics would be a much better fit to add
> a test for this specific property

Right.

> so let's keep injection_points out
> of it, even if it means that we would have only coverage for
> variable-numbered stats.

Right, and only when per-backend I/O stats goes in.

> So let's keep it simple here, and just set
> .write_to_file to true for both injection_points stats kinds per the
> scope of this thread.

That's fine by me (the code is simple enough anyway). Done that way in v3
attached.

> Another point is that injection_points acts as
> a template for custom pgstats

That was in fact the main reason why I added this test. But well, just
adding the "write_to_file" in the injection test is enough to "show" that this
member does exist. So I'm fine with v3.

Regards,

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

Attachment Content-Type Size
v3-0001-Add-a-write_to_file-member-to-PgStat_KindInfo.patch text/x-diff 7.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-11-21 06:34:15 Re: POC, WIP: OR-clause support for indexes
Previous Message Michael Paquier 2024-11-21 06:25:09 Re: memory leak in pgoutput