Re: Using stat collector for collecting long SQL

From: Andres Freund <andres(at)anarazel(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using stat collector for collecting long SQL
Date: 2020-03-06 17:32:55
Message-ID: 20200306173255.iwyforacbkqayfjt@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-02-27 09:42:19 +0100, Pavel Stehule wrote:
> There is a often problem with taking source of long SQL strings. The
> pg_stat_activity field query is reduced to some short limit and is not too
> practical to increase this limit.
>
> I have a idea to use for solution of this problem stat_collector process.
> When the query string is reduced, then full form of query string can be
> saved in stat_collector process. Maybe with execution plan. Then any
> process can read these information from this process.

How? That sounds extremely expensive.

> What do you think about this idea? It can be base for implementation
> EXPLAIN PID ?

I'm fairly strongly against adding any new dependencies on the stats
collector process. We're slowly working on getting rid of it (see the
thread about making the stats system use dynamic shared memory).

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-03-06 17:33:54 Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Previous Message Andres Freund 2020-03-06 17:29:34 Re: [postgis-devel] About EXTENSION from UNPACKAGED on PostgreSQL 13