Re: Using stat collector for collecting long SQL - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Using stat collector for collecting long SQL
Date
Msg-id 20200306173255.iwyforacbkqayfjt@alap3.anarazel.de
Whole thread Raw
In response to Using stat collector for collecting long SQL  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [postgis-devel] About EXTENSION from UNPACKAGED on PostgreSQL 13
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.