Re: BUG #18790: Pg_stat_statements doesn't track schema.
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: raghshr1351@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-01-30T06:40:34Z
Lists: pgsql-bugs
On Wed, Jan 29, 2025 at 07:10:33PM +0000, PG Bug reporting form wrote: > Currently, pg_stat_statment doesn't track the schema to which the query > belongs. In the case of a multitenant database, it becomes hard to find a > query belonging to which customer is the culprit. It could be solely an > enhancement, so my question is, Is it useful to expose the schema name also? > If yes can I contribute to add this support? Objects from multiple schemas could be used in a single query. Even if multiple schemas are tracked, I doubt that the cost of tracking them is going to be really useful at this level for monitoring. Or perhaps you have some specific use case in mind? -- Michael