Re: AW: Is it possible to turn on pg_stat_extensions at a database level

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: depesz(at)depesz(dot)com, "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>
Cc: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: AW: Is it possible to turn on pg_stat_extensions at a database level
Date: 2026-03-12 19:59:36
Message-ID: b6e9a932db4e280977db1888acfe03b1f182d8bb.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 2026-03-12 at 10:38 +0100, hubert depesz lubaczewski wrote:
> On Thu, Mar 12, 2026 at 09:33:29AM +0000, Subramanian,Ramachandran wrote:
> >    I meant to ask if the extension can be created only for one database, so that the details from the other databases are not recorded.
>
> So, no. You can't.

... but there is no need to do that.

If you are only interested in the statistics for statements on a single database,
add a WHERE condition with the database's object ID, like

WHERE dbid = 47110815

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Subramanian,Ramachandran 2026-03-13 05:54:42 AW: AW: Is it possible to turn on pg_stat_extensions at a database level
Previous Message hubert depesz lubaczewski 2026-03-12 09:38:24 Re: AW: Is it possible to turn on pg_stat_extensions at a database level