Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 05:24:22PM +0900, Michael Paquier wrote: > On Thu, Mar 23, 2023 at 07:51:37AM +0100, Drouvot, Bertrand wrote: > > Thank you both for your keen eye! I just did another check too and did not > > find more than the ones you've just reported. > > This matches what I have,

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 07:51:37AM +0100, Drouvot, Bertrand wrote: > Thank you both for your keen eye! I just did another check too and did not > find more than the ones you've just reported. This matches what I have, thanks! -- Michael signature.asc Description: PGP signature

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-23 Thread Drouvot, Bertrand
Hi, On 3/23/23 1:09 AM, Michael Paquier wrote: On Wed, Mar 22, 2023 at 02:52:23PM -0400, Melanie Plageman wrote: This comment still has the t_ prefix as does the one for tuples_updated and deleted. otherwise, LGTM. Good catch. pgstat_count_heap_update() has a t_tuples_hot_updated, and

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-22 Thread Michael Paquier
On Wed, Mar 22, 2023 at 02:52:23PM -0400, Melanie Plageman wrote: > This comment still has the t_ prefix as does the one for tuples_updated > and deleted. > > otherwise, LGTM. Good catch. pgstat_count_heap_update() has a t_tuples_hot_updated, and pgstat_update_heap_dead_tuples() a

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-22 Thread Melanie Plageman
On Mon, Mar 20, 2023 at 10:05:21AM +0100, Drouvot, Bertrand wrote: > Hi, > > On 3/20/23 8:32 AM, Michael Paquier wrote: > > > > /* Total time previously charged to function, as of function start > > */ > > - instr_time save_f_total_time; > > + instr_time

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-21 Thread Michael Paquier
On Mon, Mar 20, 2023 at 10:05:21AM +0100, Drouvot, Bertrand wrote: > Good point and keeping it as it is currently would not > affect the work that is/will be done in [1]. I guess that I'm OK with that to get more of pgstatfuncs.c to use macros for the function definitions there.. Alvaro, Tom,

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-20 Thread Drouvot, Bertrand
Hi, On 3/20/23 8:32 AM, Michael Paquier wrote: /* Total time previously charged to function, as of function start */ - instr_time save_f_total_time; + instr_time save_total_time; I have something to say about this one, though.. I find this change a bit

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-20 Thread Michael Paquier
On Thu, Jan 12, 2023 at 10:07:33AM -0800, Andres Freund wrote: > The problem with that is that the prefixes are used completely inconsistently > - and have been for a long time. And not just between the different type of > stats. Compare e.g. PgStat_TableCounts with PgStat_TableXactStatus and >

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-01-12 Thread Andres Freund
Hi, On 2023-01-12 18:12:52 +0100, Alvaro Herrera wrote: > On 2023-Jan-12, Drouvot, Bertrand wrote: > > > Please find attached a patch to $SUBJECT. > > > > It is a preliminary patch for [1]. > > > > The main ideas are: 1) to have consistent naming between the pg_stat_get*() > > functions > > and

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-01-12 Thread Tom Lane
Alvaro Herrera writes: > I don't like this at all. With these prefixes in place, it's much more > likely that you'll be able to grep the whole source tree and not run > into tons of false positives. If you remove them, that tends to be not > very workable. If we use these commits as precedent

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-01-12 Thread Alvaro Herrera
On 2023-Jan-12, Drouvot, Bertrand wrote: > Please find attached a patch to $SUBJECT. > > It is a preliminary patch for [1]. > > The main ideas are: 1) to have consistent naming between the pg_stat_get*() > functions > and their associated counters and 2) to define the new macros in [1] the

Remove nonmeaningful prefixes in PgStat_* fields

2023-01-12 Thread Drouvot, Bertrand
Hi hackers, Please find attached a patch to $SUBJECT. It is a preliminary patch for [1]. The main ideas are: 1) to have consistent naming between the pg_stat_get*() functions and their associated counters and 2) to define the new macros in [1] the same way as it has been done in 8018ffbf58