1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Temporary patch to help debug pg_walsummary test failures.

The tests in 002_blocks.pl are failing in the buildfarm from time to
time, but we don't know how to reproduce the failure elsewhere. The
most obvious explanation seems to be the unexpected disappearance of a
WAL summary file, so bump up the logging level in
RemoveWalSummaryIfOlderThan to try to help us spot such problems, and
print the cutoff time in addition to the removed filename. Also
adjust 002_blocks.pl to dump out a directory listing of the relevant
directory at various points.

This patch should be reverted once we sort out what's happening here.

Patch by me, reviewed by Nathan Bossart, who also reported the issue.

Discussion: http://postgr.es/m/20240124170846.GA2643050@nathanxps13
This commit is contained in:
Robert Haas
2024-01-26 13:25:19 -05:00
parent 5eafacd279
commit 5ddf997347
2 changed files with 21 additions and 0 deletions

View File

@@ -251,8 +251,15 @@ RemoveWalSummaryIfOlderThan(WalSummaryFile *ws, time_t cutoff_time)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not stat file \"%s\": %m", path)));
/* XXX temporarily changed to debug buildfarm failures */
#if 0
ereport(DEBUG2,
(errmsg_internal("removing file \"%s\"", path)));
#else
ereport(LOG,
(errmsg_internal("removing file \"%s\" cutoff_time=%llu", path,
(unsigned long long) cutoff_time)));
#endif
}
/*