Re: Generating code for query jumbling through gen_node_support.pl

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>, "Drouvot, Bertrand" <bdrouvot@amazon.com>
Date: 2023-02-08T07:01:03Z
Lists: pgsql-hackers
Hi,

On 2023-02-08 15:47:51 +0900, Michael Paquier wrote:
> This one was intentional to let extensions play with jumbling of such
> nodes, but perhaps you are right that it makes little sense at this
> stage.  If there is an ask for it later, though..  Using
> shared_preload_libraries = pg_stat_statements and compute_query_id =
> regress shows that numbers go up to 60% for funcs.c and 30% for
> switch.c.  Removing nodes like as of the attached brings these numbers
> respectively up to 94.5% and 93.5% for a check.  With a check-world, I
> measure respectively 96.7% and 96.1% because there is more coverage
> for extensions, ALTER SYSTEM and database commands, roughly.

Given that we already pay the price of multiple regress runs, and that
jumbling is now really a core feature, perhaps we should enable
pg_stat_statements in pg_upgrade or 027_stream_regress.pl? I'd hope it
wouldn't add a meaningful amount of time?  A tiny bit of verification at the
end should also be ok.

Both pg_upgrade and 027_stream_regress.pl have some advantages. The former
would test pg_upgrade interactions with shared_preload_libraries, the latter
could do some basic checks of pg_stat_statements on a standby.

Greetings,

Andres Freund



Commits

  1. Mark more nodes with attribute no_query_jumble

  2. Include values of A_Const nodes in query jumbling

  3. Generate code for query jumbling through gen_node_support.pl

  4. Rework format of comments in headers for nodes

  5. Move queryjumble.c code to src/backend/nodes/

  6. Fix some compiler warnings in aset.c and generation.c

  7. Reformat some node comments