Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements - Mailing list pgsql-hackers

From Andrei Zubkov
Subject Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Date
Msg-id e8f1e04103694c3c2500e8eec08cf5107a00656c.camel@moonset.ru
Whole thread Raw
In response to Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements  (Andrei Lepikhov <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
On Thu, 2023-10-26 at 15:49 +0700, Andrei Lepikhov wrote:
> It is the gist of my question. If needed, You can remove the record
> by
> (userid, dbOid, queryId). As I understand, this extension is usually
> used by an administrator. Who can reset these parameters except you
> and
> the DBMS?
This extension is used by administrator but indirectly through some
kind of sampling solution providing information about statistics change
over time. The only kind of statistics unavailable to sampling
solutions without a periodic reset is a min/max statistics. This patch
provides a way for resetting those statistics without entry eviction.
Suppose the DBA will use several sampling solutions. Every such
solution can perform its own resets of min/max statistics. Other
sampling solutions need a way to detect such resets to avoid undetected
interference. Timestamping of min/max reset can be used for that
purpose.

--
regards, Andrei Zubkov
Postgres Professional



pgsql-hackers by date:

Previous
From: Smolkin Grigory
Date:
Subject: Re: race condition in pg_class
Next
From: Andrew Dunstan
Date:
Subject: Re: trying again to get incremental backup