Enable pg_stat_statements extension for limited statements only - Mailing list pgsql-hackers

From Sayyid Ali Sajjad Rizavi
Subject Enable pg_stat_statements extension for limited statements only
Date
Msg-id CAHxW8BC_n9c=2DJatqmas54HSTd9j2LVBG-OvoLUK4Sg-Qm+rw@mail.gmail.com
Whole thread Raw
Responses Re: Enable pg_stat_statements extension for limited statements only
List 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.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: New docs chapter on Transaction Management and related changes
Next
From: Alvaro Herrera
Date:
Subject: Re: generic plans and "initial" pruning