pgsql: instrumentation: Separate trigger logic from other uses

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: instrumentation: Separate trigger logic from other uses
Дата
Msg-id E1w9Ubw-0038O2-28@gemulon.postgresql.org
обсуждение
Список pgsql-committers
instrumentation: Separate trigger logic from other uses

Introduce TriggerInstrumentation to capture trigger timing and firings
(previously counted in "ntuples"), to aid a future refactoring that
splits out all Instrumentation fields beyond timing and WAL/buffers into
more specific structs.

In passing, drop the "n" argument to InstrAlloc, as all remaining callers need
exactly one Instrumentation struct.  The duplication between InstrAlloc() and
InstrInit(), as well as the conditional initialization of async_mode will be
addressed in a subsequent commit.

Author: Lukas Fittl <lukas@fittl.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion:
https://www.postgresql.org/message-id/flat/CAP53PkzdBK8VJ1fS4AZ481LgMN8f9mJiC39ZRHqkFUSYq6KWmg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7d9b74df53e9268bd638274f1415ebfeecf0de51

Modified Files
--------------
contrib/auto_explain/auto_explain.c             |  2 +-
contrib/pg_stat_statements/pg_stat_statements.c |  2 +-
src/backend/commands/explain.c                  | 21 +++++------
src/backend/commands/trigger.c                  | 22 ++++++------
src/backend/executor/execMain.c                 |  2 +-
src/backend/executor/execProcnode.c             |  2 +-
src/backend/executor/instrument.c               | 48 +++++++++++++++++--------
src/include/executor/instrument.h               | 15 ++++++--
src/include/nodes/execnodes.h                   |  3 +-
src/tools/pgindent/typedefs.list                |  1 +
10 files changed, 75 insertions(+), 43 deletions(-)


В списке pgsql-committers по дате отправления: