Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yun Li <liyunjuanyong(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: 2019-03-16 01:50:08
Message-ID: 21800.1552701008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yun Li <liyunjuanyong(at)gmail(dot)com> writes:
> Do you think if we can add queryId into the pg_stat_get_activity function
> and ultimatly expose it in the view? It would be easier to track "similar"
> query's performance over time easier.

No, we're not likely to do that, because it would mean (1) baking one
single definition of "query ID" into the core system and (2) paying
the cost to calculate that ID all the time.

pg_stat_statements has a notion of query ID, but that notion might be
quite inappropriate for other usages, which is why it's an extension
and not core.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-03-16 04:16:23 Re: Making all nbtree entries unique by having heap TIDs participate in comparisons
Previous Message Amit Kapila 2019-03-16 01:29:53 Re: WIP: Avoid creation of the free space map for small tables