mirror of
https://github.com/postgres/postgres.git
synced 2026-04-07 10:17:24 -04:00
Previously, different places (e.g. query "total time") were repurposing the Instrumentation struct initially introduced for capturing per-node statistics during execution. This overuse of the same struct is confusing, e.g. by cluttering calls of InstrStartNode/InstrStopNode in unrelated code paths, and prevents future refactorings. Instead, simplify the Instrumentation struct to only track time and WAL/buffer usage. Similarly, drop the use of InstrEndLoop outside of per-node instrumentation - these calls were added without any apparent benefit since the relevant fields were never read. Introduce the NodeInstrumentation struct to carry forward the per-node instrumentation information. WorkerInstrumentation is renamed to WorkerNodeInstrumentation for clarity. In passing, clarify that InstrAggNode is expected to only run after InstrEndLoop (as it does in practice), and drop unused code. This also fixes a consequence-less bug: Previously ->async_mode was only set when a non-zero instrument_option was passed. That turns out to be harmless right now, as ->async_mode only affects a timing related field. Author: Lukas Fittl <lukas@fittl.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CAP53PkzdBK8VJ1fS4AZ481LgMN8f9mJiC39ZRHqkFUSYq6KWmg@mail.gmail.com |
||
|---|---|---|
| .. | ||
| expected | ||
| specs | ||
| sql | ||
| t | ||
| .gitignore | ||
| connection.c | ||
| deparse.c | ||
| Makefile | ||
| meson.build | ||
| option.c | ||
| postgres_fdw--1.0--1.1.sql | ||
| postgres_fdw--1.0.sql | ||
| postgres_fdw--1.1--1.2.sql | ||
| postgres_fdw--1.2--1.3.sql | ||
| postgres_fdw.c | ||
| postgres_fdw.control | ||
| postgres_fdw.h | ||
| shippable.c | ||