Add generic_plans and custom_plans fields into pg_prepared_statements.
Fujii Masao <fujii@postgresql.org>
Add generic_plans and custom_plans fields into pg_prepared_statements. There was no easy way to find how many times generic and custom plans have been executed for a prepared statement. This commit exposes those numbers of times in pg_prepared_statements view. Author: Atsushi Torikoshi, Kyotaro Horiguchi Reviewed-by: Tatsuro Yamada, Masahiro Ikeda, Fujii Masao Discussion: https://postgr.es/m/CACZ0uYHZ4M=NZpofH6JuPHeX=__5xcDELF8hT8_2T+R55w4RQw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +18 −0 |
| src/backend/commands/prepare.c | modified | +11 −4 |
| src/backend/utils/cache/plancache.c | modified | +11 −6 |
| src/include/catalog/pg_proc.dat | modified | +3 −3 |
| src/include/utils/plancache.h | modified | +2 −1 |
| src/test/regress/expected/plancache.out | modified | +43 −0 |
| src/test/regress/expected/rules.out | modified | +4 −2 |
| src/test/regress/sql/plancache.sql | modified | +13 −0 |
Documentation touched
Discussion
- Is it useful to record whether plans are generic or custom? 60 messages · 2020-05-12 → 2021-04-05