RE: [PATCH] Tracking statements entry timestamp in pg_stat_statements

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
To: 'Andrei Zubkov' <zubkov@moonset.ru>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-23T02:13:25Z
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 →
  1. Improve quoting in some error messages

Dear Andrei,

I think the idea is good because the pg_stat_statements_info view cannot distinguish
whether the specific statement is deallocated or not.
But multiple calling of GetCurrentTimestamp() may cause some performance issues.
How about adding a configuration parameter for controlling this feature?
Or we don't not have to worry about that?


> +		if (api_version >= PGSS_V1_9)
> +		{
> +			values[i++] = TimestampTzGetDatum(first_seen);
> +		}

I think {} is not needed here.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED