Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

Andrei Zubkov <zubkov@moonset.ru>

From: Andrei Zubkov <zubkov@moonset.ru>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Greg Stark <stark@mit.edu>, Andres Freund <andres@anarazel.de>, "Anton A. Melnikov" <aamelnikov@inbox.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-04T06:59:04Z
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

Attachments

Hi Julien,

Thank you very much for your work on this patch!

On Mon, 2022-04-04 at 10:31 +0800, Julien Rouhaud wrote:
> - the commit message:
> 
> It should probably mention the mimnax_stats_since at the beginning. 
> Also, both
> the view and the function contain those new field.
> 
> Minor rephrasing:
> 
> s/evicted and returned back/evicted and stored again/?
> s/with except of all/with the exception of all/
> s/is now returns/now returns/

Agreed, commit message updated.

> - code:
> 
> +#define SINGLE_ENTRY_RESET() \
> +if (entry) { \
> [...]
> 
> It's not great to rely on caller context too much.

Yes, I was thinking about it. But using 4 parameters seemed strange to
me.

>   I think it would be better
> to pass at least the entry as a parameter (maybe e?) to the macro for
> more
> clarity.  I'm fine with keeping minmax_only, stats_reset and
> num_remove as is.

Using an entry as a macro parameter looks good, I'm fine with "e". 

> Apart from that I think this is ready!

v13 attached
--
regards, Andrei