mirror of https://github.com/postgres/postgres
31de7e60da
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 |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
Makefile | ||
meson.build | ||
pg_stat_statements--1.0--1.1.sql | ||
pg_stat_statements--1.1--1.2.sql | ||
pg_stat_statements--1.2--1.3.sql | ||
pg_stat_statements--1.3--1.4.sql | ||
pg_stat_statements--1.4--1.5.sql | ||
pg_stat_statements--1.4.sql | ||
pg_stat_statements--1.5--1.6.sql | ||
pg_stat_statements--1.6--1.7.sql | ||
pg_stat_statements--1.7--1.8.sql | ||
pg_stat_statements--1.8--1.9.sql | ||
pg_stat_statements--1.9--1.10.sql | ||
pg_stat_statements.c | ||
pg_stat_statements.conf | ||
pg_stat_statements.control |