Re: add checkpoint stats of snapshot and mapping files of pg_logical dir - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Date
Msg-id 20220825.172549.166793275631762683.horikyota.ntt@gmail.com
Whole thread Raw
In response to add checkpoint stats of snapshot and mapping files of pg_logical dir  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
At Wed, 24 Aug 2022 13:34:54 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Wed, Aug 24, 2022 at 10:48:01AM +0900, Kyotaro Horiguchi wrote:
> > By the way, I think we use INSTR_TIME_* macros to do masure internal
> > durations (mainly for the monotonic clock characteristics, and to
> > reduce performance degradation on Windows?). I'm not sure that's
> > crutial here but I don't think there's any reason to use
> > GetCurrentTimestamp() instead.
> 
> This implies two calls of gettimeofday(), but that does not worry me
> much in this code path.  There is some consistency with
> CheckpointGuts() where we take timestamps for the sync requests.

Mmm. heap_vacuum_rel does the same. From the other direction, the two
are the only use of GetCurrentTimestamp() for this purpose. However,
I'm fine with that. Thanks for the info.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Dong Wook Lee
Date:
Subject: Re: pg_basebackup: add test about zstd compress option
Next
From: Alvaro Herrera
Date:
Subject: Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)