pg_stat_statements does not require shared_preload_libraries to be modified

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: juraj(dot)kristofik(at)enterprisedb(dot)com
Subject: pg_stat_statements does not require shared_preload_libraries to be modified
Date: 2026-03-18 02:37:09
Message-ID: 177380142997.811.12346365369880204472@wrigleys.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/pgstatstatements.html
Description:

Hi,

This is inaccurate at
https://www.postgresql.org/account/comments/new/18/pgstatstatements.html/
the module just needs the contrib package;
The docs:
The pg_stat_statements module provides a means for tracking planning and
execution statistics of all SQL statements executed by a server.

The module must be loaded by adding pg_stat_statements to
shared_preload_libraries in postgresql.conf, because it requires additional
shared memory. This means that a server restart is needed to add or remove
the module. In addition, query identifier calculation must be enabled in
order for the module to be active, which is done automatically if
compute_query_id is set to auto or on, or any third-party module that
calculates query identifiers is loaded.

When pg_stat_statements is active, it tracks statistics across all databases
of the server. To access and manipulate these statistics, the module
provides views pg_stat_statements and pg_stat_statements_info, and the
utility functions pg_stat_statements_reset and pg_stat_statements. These are
not available globally but can be enabled for a specific database with
CREATE EXTENSION pg_stat_statements.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2026-03-18 11:17:10 Conflict in documentation
Previous Message Tom Lane 2026-03-16 13:44:23 Re: INTERVAL output format for iso_8601 is without dashes