Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Andrei Zubkov <zubkov@moonset.ru>
From: Andrei Zubkov <zubkov@moonset.ru>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Greg Stark <stark@mit.edu>, Andres Freund <andres@anarazel.de>, Julien Rouhaud <rjuju123@gmail.com>
Date: 2023-01-25T15:46:40Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve quoting in some error messages
- 07e5e6674233 14.0 cited
Attachments
- v15-0001-pg_stat_statements-Track-statement-entry-timestamp.patch (text/x-patch) patch v15-0001
Hi, I've updated this patch for the current master. Also I have some additional explanations.. On Wed, 2023-01-18 at 17:29 +0100, Tomas Vondra wrote: > 1) I'm not sure why the patch is adding tests of permissions on the > pg_stat_statements_reset function? I've fixed that > > 2) If we want the second timestamp, shouldn't it also cover resets of > the mean values, not just min/max? I think that mean values are not a targets for auxiliary resets because any sampling solution can easily calculate the mean values between samples without a reset. > > 3) I don't understand why the patch is adding "IS NOT NULL AS t" to > various places in the regression tests. This change is necessary in the current version because the pg_stat_statements_reset() function will return a timestamp of a reset, needed for sampling solutions to detect resets, perfermed by someone else. Regards -- Andrei Zubkov