log_parser_stats

A configuration parameter determining whether to log parser statistics for a statement

log_parser_stats is a configuration parameter determining whether to log detailed parser statistics for a statement.

log_parser_stats was added in PostgreSQL 7.4.

Usage

If log_parser_stats is set to "on", a DETAIL line will be emitted containing details about the statement parsing, including execution time and memory / i/o usage.

log_parser_stats cannot be enabled at the same time as log_statement_stats.

Default value

The default value for log_parser_stats is: off.

Change history

Examples

Log output from issuing a simple statement ("SELECT 1"):

[2021-03-29 23:09:03 UTC] psql postgres postgres STATEMENT:  SELECT 1;
[2021-29-30 23:09:03 UTC] psql postgres postgres LOG:  00000: REWRITER STATISTICS
[2021-29-30 23:09:03 UTC] psql postgres postgres DETAIL:  ! system usage stats:
        !       0.000000 s user, 0.000005 s system, 0.000004 s elapsed
        !       [0.000000 s user, 0.001668 s system total]
        !       10960 kB max resident size
        !       0/0 [0/0] filesystem blocks in/out
        !       0/1 [0/451] page faults/reclaims, 0 [0] swaps
        !       0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
        !       0/0 [3/0] voluntary/involuntary context switches

Categories

GUC configuration item, Logging

See also

log_executor_stats, log_planner_stats, log_statement_stats