mirror of
https://github.com/postgres/postgres.git
synced 2026-04-11 12:06:55 -04:00
Until now extensions that wanted to measure overall query execution could
create QueryDesc->totaltime, which the core executor would then start and
stop. That's a bit odd and composes badly, e.g. extensions always had to use
INSTRUMENT_ALL, because otherwise another extension might not get what they
need.
Instead this introduces a new field, QueryDesc->query_instr_options, that
extensions can use to indicate whether they need query level instrumentation
populated, and with which instrumentation options. Extensions should take care
to only add options they need, instead of replacing the options of others.
The prior name of the field, totaltime, sounded like it would only measure
time, but these days the instrumentation infrastructure can track more
resources. The secondary benefit is that this will make it obvious to
extensions that they may not create the Instrumentation struct themselves
anymore (often extensions build only against a postgres build without
assertions).
Adjust pg_stat_statements and auto_explain to match, and lower the
requested instrumentation level for auto_explain to INSTRUMENT_TIMER,
since the summary instrumentation it needs is only runtime.
The reason to push this now, rather in the PG 20 cycle, is that
|
||
|---|---|---|
| .. | ||
| execAsync.h | ||
| execdebug.h | ||
| execdesc.h | ||
| execExpr.h | ||
| execParallel.h | ||
| execPartition.h | ||
| execScan.h | ||
| executor.h | ||
| functions.h | ||
| hashjoin.h | ||
| instrument.h | ||
| instrument_node.h | ||
| nodeAgg.h | ||
| nodeAppend.h | ||
| nodeBitmapAnd.h | ||
| nodeBitmapHeapscan.h | ||
| nodeBitmapIndexscan.h | ||
| nodeBitmapOr.h | ||
| nodeCtescan.h | ||
| nodeCustom.h | ||
| nodeForeignscan.h | ||
| nodeFunctionscan.h | ||
| nodeGather.h | ||
| nodeGatherMerge.h | ||
| nodeGroup.h | ||
| nodeHash.h | ||
| nodeHashjoin.h | ||
| nodeIncrementalSort.h | ||
| nodeIndexonlyscan.h | ||
| nodeIndexscan.h | ||
| nodeLimit.h | ||
| nodeLockRows.h | ||
| nodeMaterial.h | ||
| nodeMemoize.h | ||
| nodeMergeAppend.h | ||
| nodeMergejoin.h | ||
| nodeModifyTable.h | ||
| nodeNamedtuplestorescan.h | ||
| nodeNestloop.h | ||
| nodeProjectSet.h | ||
| nodeRecursiveunion.h | ||
| nodeResult.h | ||
| nodeSamplescan.h | ||
| nodeSeqscan.h | ||
| nodeSetOp.h | ||
| nodeSort.h | ||
| nodeSubplan.h | ||
| nodeSubqueryscan.h | ||
| nodeTableFuncscan.h | ||
| nodeTidrangescan.h | ||
| nodeTidscan.h | ||
| nodeUnique.h | ||
| nodeValuesscan.h | ||
| nodeWindowAgg.h | ||
| nodeWorktablescan.h | ||
| spi.h | ||
| spi_priv.h | ||
| tablefunc.h | ||
| tqueue.h | ||
| tstoreReceiver.h | ||
| tuptable.h | ||