postgresql/src/include/nodes
Michael Paquier 31de7e60da Show savepoint names as constants in pg_stat_statements
In pg_stat_statements, savepoint names now show up as constants with a
parameter symbol, using as base query string the one added as a new
entry to the PGSS hash table, leading to:
RELEASE $1
ROLLBACK TO $1
SAVEPOINT $1

Applying constants to these query parts is a huge advantage for
workloads that generate randomly savepoint points, like ORMs (Django is
at the origin of this patch).  The ODBC driver is a second layer that
likes a lot savepoints, though it does not use a random naming pattern.

A "location" field is added to TransactionStmt, now set only for
savepoints.  The savepoint name is ignored by the query jumbling.  The
location can be extended to other query patterns, if required, like 2PC
commands.  Some tests are added to pg_stat_statements for all the query
patterns supported by the parser.

ROLLBACK, ROLLBACK TO SAVEPOINT and ROLLBACK TRANSACTION TO SAVEPOINT
have the same Node representation, so all these are equivalents.  The
same happens for RELEASE and RELEASE SAVEPOINT.

Author: Greg Sabino Mullane
Discussion: https://postgr.es/m/CAKAnmm+2s9PA4OaumwMJReWHk8qvJ_-g1WqxDRDAN1BSUfxyTw@mail.gmail.com
2023-07-27 09:42:33 +09:00
..
.gitignore Automatically generate node support functions 2022-07-09 08:53:59 +02:00
bitmapset.h Require empty Bitmapsets to be represented as NULL. 2023-03-02 11:47:26 -05:00
execnodes.h Fix misbehavior of EvalPlanQual checks with multiple result relations. 2023-05-19 14:26:40 -04:00
extensible.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
lockoptions.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
makefuncs.h Code review for commit b6e1157e7d 2023-07-21 19:15:34 +09:00
memnodes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
meson.build meson: Add dependencies to perl modules to various script invocations 2023-06-09 20:12:16 -07:00
miscnodes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
multibitmapset.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
nodeFuncs.h Fix typos in comments 2023-05-02 12:23:08 +09:00
nodes.h Support "Right Anti Join" plan shapes. 2023-04-05 16:59:09 -04:00
params.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
parsenodes.h Show savepoint names as constants in pg_stat_statements 2023-07-27 09:42:33 +09:00
pathnodes.h Fix filtering of "cloned" outer-join quals some more. 2023-05-25 10:28:33 -04:00
pg_list.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
plannodes.h Revert "Move PartitionPruneInfo out of plan nodes into PlannedStmt" 2023-05-04 12:09:59 +02:00
primnodes.h Add more SQL/JSON constructor functions 2023-07-26 17:08:33 +09:00
print.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
queryjumble.h Remove dependency to query text in JumbleQuery() 2023-06-28 08:59:36 +09:00
readfuncs.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
replnodes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
subscripting.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
supportnodes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
tidbitmap.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
value.h Update copyright for 2023 2023-01-02 15:00:37 -05:00