Some refactoring for fixed-numbered stats template in injection_points

Started by Michael Paquierover 1 year ago1 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,

While reading again the code of injection_stats_fixed.c that holds the
template for fixed-numbered pgstats, I got an idea to make the code a
bit more elegant. Rather than using a single routine to increment the
counters, we could use a series of routines with its internals hidden
in a macro like in pgstatfuncs.c.

The point of a template is to be as elegant as possible, and this
is arguably a better style, still this comes down to personal taste
perhaps. Please feel free to comment about the attached.

Thanks,
--
Michael

Attachments:

0001-injection_points-Make-template-for-fixed-numbered-st.patchtext/x-diff; charset=us-asciiDownload+40-36