mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 16:43:23 +02:00
When executing a utility statement, we must fetch everything we need out of the PlannedStmt data structure before calling standard_ProcessUtility. In certain cases (possibly only ROLLBACK in extended query protocol), that data structure will get freed during command execution. The situation is probably often harmless in production builds, but in debug builds we intentionally overwrite the freed memory with garbage, leading to picking up garbage values of statement location and length, typically causing an assertion failure later in pg_stat_statements. In non-debug builds, if something did go wrong it would likely lead to storing garbage for the query string. Report and fix by zhaoqigui (with cosmetic adjustments by me). It's an old problem, so back-patch to all supported versions. Discussion: https://postgr.es/m/17663-a344fd0675f92128@postgresql.org Discussion: https://postgr.es/m/1667307420050.56657@hundsun.com |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
Makefile | ||
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 |