Re: pg_stat_statements oddity with track = all - Mailing list pgsql-hackers

From legrand legrand
Subject Re: pg_stat_statements oddity with track = all
Date
Msg-id 1606916496022-0.post@n3.nabble.com
Whole thread Raw
In response to Re: pg_stat_statements oddity with track = all  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: pg_stat_statements oddity with track = all
List pgsql-hackers
Hi,

a crazy idea:
- add a parent_statement_id column that would be NULL for top level queries
- build statement_id for nested queries based on the merge of:
   a/ current_statement_id and parent one
or
   b/ current_statement_id and nested level.

this would offer the ability to track counters at any depth level ;o)
Regards
PAscal



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html



pgsql-hackers by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re: proposal: function pg_setting_value_split() to parse shared_preload_libraries etc.
Next
From: Simon Riggs
Date:
Subject: Re: Huge memory consumption on partitioned table with FKs