Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Michael Paquier
On Thu, Nov 21, 2024 at 12:57:18PM -0500, Yogesh Sharma wrote: > Thanks for patch. I have tested both patches and they work as per design. I've missed your message, sorry about that. -- Michael signature.asc Description: PGP signature

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Michael Paquier
On Thu, Nov 21, 2024 at 08:49:13AM +, Bertrand Drouvot wrote: > On Thu, Nov 21, 2024 at 10:38:28AM +0300, Nazir Bilal Yavuz wrote: >> -if (!info || !info->fixed_amount) >> +/* skip if not fixed or this kind does not want to write to the >> file */ >> +if (!info || !info

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Yogesh Sharma
Hi, Thanks for patch. I have tested both patches and they work as per design. My +1 for v1, it is much cleaner approach and has properly named functions whereas in v2 it is not. Injection points is documented, if so, doc patch is missing. Regards, Yogesh On 11/20/24 12:13, Bertrand Drouvot

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Bertrand Drouvot
exist. So I'm fine with v3. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com >From 86272b17ecb58c04931eb268d20714a7b389c3af Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Wed, 20 Nov 2024 08:35:13

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Bertrand Drouvot
Hi, On Thu, Nov 21, 2024 at 04:26:47PM +0900, Michael Paquier wrote: > On Thu, Nov 21, 2024 at 06:32:03AM +, Bertrand Drouvot wrote: > > 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 > > th

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-21 Thread Bertrand Drouvot
> Assert(pg_atomic_read_u32(&ps->refcount) > 0); Makes sense, done in v4 attached. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com >From 37009b778e83a1f4d6d5365d0ab90db2daa62176 Mon Sep

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Nazir Bilal Yavuz
Hi, On Thu, 21 Nov 2024 at 09:32, Bertrand Drouvot wrote: > 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. I think that the changes below (write_to_f

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Michael Paquier
On Thu, Nov 21, 2024 at 06:32:03AM +, Bertrand Drouvot wrote: > 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. Plus/minus some tweaks in the wordi

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Michael Paquier
On Wed, Nov 20, 2024 at 05:13:18PM +, 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. Well, I like the enthusiasm of having tests, but injection_points

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Bertrand Drouvot
greSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com >From 53f4afaed64d6975b022da22db7f5e7fe0134ca7 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Wed, 20 Nov 2024 08:35:13 +0000 Subject: [PATCH v2] Add a write_to_file member to PgStat_KindInf

Re: Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Nazir Bilal Yavuz
Hi, Thank you for working on this! On Wed, 20 Nov 2024 at 17:05, Bertrand Drouvot 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 pe

Add a write_to_file member to PgStat_KindInfo

2024-11-20 Thread Bertrand Drouvot
://aws.amazon.com >From 229cbce525382c36d461246dccc0ab6a71b31c17 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Wed, 20 Nov 2024 08:35:13 + Subject: [PATCH v1] Add a write_to_file member to PgStat_KindInfo This new member allows the statistics to configure whether or not they want to be written