nested queries vs. pg_stat_activity

From: legrand legrand <legrand_legrand(at)hotmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: nested queries vs. pg_stat_activity
Date: 2020-08-10 16:51:40
Message-ID: AM6PR0102MB3157EC9857150EF68C65BC7C90440@AM6PR0102MB3157.eurprd01.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

An other solution is to expose nested queryid, and to join it with pg_stat_statements.
Actual development trying to add queryid to pg_stat_activity isn't helpfull, because it is only exposing top level one.
Extension pg_stat_sql_plans (github) propose a function called pg_backend_queryid(pid),
that gives the expected queryid (that is stored in shared memory for each backend) ...

Regards
PAscal

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2020-08-10 17:30:44 Re: [BUG] Error in BRIN summarization
Previous Message Shawn Debnath 2020-08-10 16:35:56 Re: pendingOps table is not cleared with fsync=off