From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add a write_to_file member to PgStat_KindInfo |
Date: | 2024-11-20 17:13:18 |
Message-ID: | Zz4YrnuKw/wU0MBf@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 Wed, Nov 20, 2024 at 05:45:55PM +0300, Nazir Bilal Yavuz wrote:
> I think this is a good idea. +1 for the $SUBJECT.
Thanks for looking at it!
> 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?
Some of the new functions are callbacks so we don't have the control on the
parameters list that the core is expecting.
It remains:
pgstat_register_inj_fixed_no_write()
pgstat_report_inj_fixed_no_write()
injection_points_stats_fixed_no_write()
for which I think we could add an extra "write_to_file" argument on their original
counterparts.
Not sure how many code reduction we would get, so out of curiosity I did the
exercice in v2 attached and that gives us:
v1:
8 files changed, 211 insertions(+), 2 deletions(-)
v2:
8 files changed, 152 insertions(+), 22 deletions(-)
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.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-a-write_to_file-member-to-PgStat_KindInfo.patch | text/x-diff | 19.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-11-20 17:14:44 | Re: Replace current implementations in crypt() and gen_salt() to OpenSSL |
Previous Message | Tom Lane | 2024-11-20 17:06:45 | Re: [PATCH] Fixed assertion issues in "pg_get_viewdef" |