pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-hackers@postgresql.org
Subject: Re: pg_stat_statements oddity with track = all
Date: Wed, 2 Dec 2020 06:41:36 -0700 (MST)
Message-ID: <1606916496022-0.post@n3.nabble.com> (raw)
In-Reply-To: <20201202082402.GB51769@nol>
References: <20201202040516.GA43757@nol>
	<CANNMO+KrVxMTrzSJLkrkENQX7utVYo1SEyaW54N+Y-Zjew=wbQ@mail.gmail.com>
	<20201202063241.GA51769@nol>
	<dc48d183-65a2-8f12-3581-ab8f3faeab8b@oss.nttdata.com>
	<20201202082402.GB51769@nol>

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





view thread (32+ messages)  latest in thread

Message-ID: <1606916496022-0.post@n3.nabble.com>
Permalink:  ../1606916496022-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1606916496022-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: legrand_legrand@hotmail.com
  Subject: Re: pg_stat_statements oddity with track = all
  In-Reply-To: <1606916496022-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox