Enable pg_stat_statements extension for limited statements only

From: Sayyid Ali Sajjad Rizavi <sasrizavi(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Enable pg_stat_statements extension for limited statements only
Date: 2022-11-30 17:57:48
Message-ID: CAHxW8BC_n9c=2DJatqmas54HSTd9j2LVBG-OvoLUK4Sg-Qm+rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, I'd like to propose a change and get advice if I should work on it.

The extension pg_stat_statements is very helpful, but the downside is that
it will take up too much disk space when storing query stats if it's
enabled for all statements like SELECT, INSERT, UPDATE, DELETE.

For example, deletes do not happen too frequently; so I'd like to be able
to enable pg_stat_statements only for the DELETE statement, maybe using
some flags.

Another possibility is if we can limit the tables to which
pg_stat_statements logs
results.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-11-30 18:12:01 Re: generic plans and "initial" pruning
Previous Message Tom Lane 2022-11-30 17:31:55 Re: New docs chapter on Transaction Management and related changes