DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Statistics / Monitoring

log_parser_stats

Writes parser performance statistics to the server log.

  • Default: off
  • Type: bool
  • Applies: Session (superuser)

In plain words

Like log_statement_stats, but reports only the parsing phases of each statement: turning SQL text into a parse tree, analysing it, and applying rewrite rules. Three blocks per statement.

For DBAs and operators

Captured on 18.6: each statement produces LOG: PARSER STATISTICS, LOG: PARSE ANALYSIS STATISTICS and LOG: REWRITER STATISTICS, each followed by the same DETAIL: ! system usage stats: block as log_statement_stats. Note that even SET and RESET are parsed and therefore produce blocks.

Mutually exclusive with log_statement_stats. Useful only for unusual cases such as extremely long query texts, huge IN lists or complex views/rules where parse or rewrite time matters; the planner and executor are usually where time goes.

How to change it

A superuser (or a role granted SET) can change it per session with SET.

See it in context

Life of a query

Related parameters

log_statement_stats log_planner_stats log_executor_stats

All Statistics parameters