From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: Misuse of TimestampDifference() in the autoprewarm feature of pg_prewarm
Date: Tue, 10 Nov 2020 22:59:33 -0500
Message-ID: <2464589.1605067173@sss.pgh.pa.us> (raw)
In-Reply-To: <01241062b6bfea2f17e32a65a4f99d61@postgrespro.ru>
References: <3b1c053a21c07c1ed5e00be3b2b855ef@postgrespro.ru>
<1992985.1604948005@sss.pgh.pa.us>
<f36e95736ed8c57d61cfb054fd734194@postgrespro.ru>
<1996862.1604953516@sss.pgh.pa.us>
<01241062b6bfea2f17e32a65a4f99d61@postgrespro.ru>
Alexey Kondratov <a.kondratov@postgrespro.ru> writes:
> After looking on the autoprewarm code more closely I have realised that
> this 'double dump' issues was not an issues at all. I have just
> misplaced a debug elog(), so its second output in the log was only
> indicating that we calculated delay_in_ms one more time.
Ah --- that explains why I couldn't see a problem.
I've pushed 0001+0002 plus some followup work to fix other places
that could usefully use TimestampDifferenceMilliseconds(). I have
not done anything with 0003 (the TAP test for pg_prewarm), and will
leave that to the judgment of somebody who's worked with pg_prewarm
before. To me it looks like it's not really testing things very
carefully at all; on the other hand, we have exactly zero test
coverage of that module today, so maybe something is better than
nothing.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.kondratov@postgrespro.ru, pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com
Subject: Re: Misuse of TimestampDifference() in the autoprewarm feature of pg_prewarm
In-Reply-To: <2464589.1605067173@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox