From: Fujii Masao Date: Thu, 23 Apr 2026 23:59:14 +0000 (+0900) Subject: pg_test_timing: fix unit in backward-clock warning X-Git-Tag: REL_17_10~43 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1fdf1c63744c301bef44bf1723ba44961a4c4af5;p=thirdparty%2Fpostgresql.git pg_test_timing: fix unit in backward-clock warning pg_test_timing reports timing differences in nanoseconds in master, and in microseconds in v14 through v18, but previously the backward-clock warning incorrectly labeled the value as milliseconds. This commit fixes the warning message to use "ns" in master and "us" in v14 through v18, matching the actual unit being reported. Backpatch to all supported versions. Author: Chao Li Reviewed-by: Lukas Fittl Reviewed-by: Xiaopeng Wang Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/F780CEEB-A237-4302-9F55-60E9D8B6533D@gmail.com Backpatch-through: 14 --- diff --git a/src/bin/pg_test_timing/pg_test_timing.c b/src/bin/pg_test_timing/pg_test_timing.c index c29d6f87629..0ccf55761ce 100644 --- a/src/bin/pg_test_timing/pg_test_timing.c +++ b/src/bin/pg_test_timing/pg_test_timing.c @@ -149,7 +149,7 @@ test_timing(unsigned int duration) if (diff < 0) { fprintf(stderr, _("Detected clock going backwards in time.\n")); - fprintf(stderr, _("Time warp: %d ms\n"), diff); + fprintf(stderr, _("Time warp: %d us\n"), diff); exit(1); }