Re: Tracking last scan time

Dave Page <dpage@pgadmin.org>

From: Dave Page <dpage@pgadmin.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Robert Treat <rob@xzilla.net>, Andres Freund <andres@anarazel.de>, Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Vik Fearing <vik@postgresfriends.org>
Date: 2022-11-08T09:25:25Z
Lists: pgsql-hackers
On Tue, 8 Nov 2022 at 04:10, Michael Paquier <michael@paquier.xyz> wrote:

> On Mon, Nov 07, 2022 at 04:54:07PM +0900, Michael Paquier wrote:
> > FWIW, all the other areas of pgstatfuncs.c manipulate timestamptz
> > fields with a style like the attached.  That's a nit, still per the
> > role of consistency with the surroundings..
> >
> > Anyway, it seems to me that a regression test is in order before a
> > scan happens just after the relation creation, and the same problem
> > shows up with last_idx_scan.
>
> Hearing nothing, done this way as of d7744d5.  Thanks for the report,
> Robert.  And thanks for the patch, Dave.
>

Thank you!

-- 
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

Commits

  1. Fix initialization of pg_stat_get_lastscan()

  2. pgstat: Track time of the last scan of a relation

  3. Have GetCurrentTransactionStopTimestamp() set xactStopTimestamp if unset