Commit Graph

13 Commits

Author SHA1 Message Date
Peter Eisentraut 97d85be365 Make the order of the header file includes consistent
Similar to commit 7e735035f2.

Author: Richard Guo <guofenglinux@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAMbWs4-WhpCFMbXCjtJ%2BFzmjfPrp7Hw1pk4p%2BZpU95Kh3ofZ1A%40mail.gmail.com
2024-03-13 15:07:00 +01:00
Nathan Bossart 3b42bdb471 Use new overflow-safe integer comparison functions.
Commit 6b80394781 introduced integer comparison functions designed
to be as efficient as possible while avoiding overflow.  This
commit makes use of these functions in many of the in-tree qsort()
comparators to help ensure transitivity.  Many of these comparator
functions should also see a small performance boost.

Author: Mats Kindahl
Reviewed-by: Andres Freund, Fabrízio de Royes Mello
Discussion: https://postgr.es/m/CA%2B14426g2Wa9QuUpmakwPxXFWG_1FaY0AsApkvcTBy-YfS6uaw%40mail.gmail.com
2024-02-16 14:05:36 -06:00
Robert Haas 19a829a327 Continue my quest to make 002_blocks.pl pass reliably.
The latest buildfarm failures show that after the insert, we don't
actually wait long enough for WAL summarization to catch up, apparently
because the on disk state gets updated before the in-memory state, and
so by checking the on disk state to see whether we're caught up and then
the in-memory state to see where exactly how far we've progressed, we
can, if unlucky, derive an older value of summarized_lsn, messing up
the rest of the test.

Attempt to fix this by using pg_available_wal_summaries() everywhere in
the test and pg_get_wal_summarizer_state() nowhere.

Per buildfarm.
2024-02-01 11:52:26 -05:00
Tom Lane 9589b038d3 Clean pg_walsummary's tmp_check directory.
Oversight similar to ba08c10fc.
2024-01-31 11:50:49 -05:00
Robert Haas b6ee30ec08 In 002_blocks.pl, try to prevent a HOT update.
Make the new tuple larger than the old one so that it, hopefully, won't
manage to squeeze into leftover freespace on the same page. The test
is trying to verify that the UPDATE touches 2 pages, but if a HOT
update happens, then it doesn't.

Per buildfarm.
2024-01-31 11:37:41 -05:00
Alvaro Herrera f0106b6d2d
Update pg_walsummary copyright notices to 2024 2024-01-31 16:46:04 +01:00
Robert Haas ea18eb7d62 Revise pg_walsummary's 002_blocks test to avoid spurious failures.
Analysis of buildfarm results showed that the code that was intended
to wait for the inserts performed by this test to complete did not
actually do so. Try to make that logic more robust.

Improve error checking elsewhere in the script, too, so that we
don't miss things like poll_query_until failing.

Along the way, fix a bit of pgindent damage introduced by commit
5ddf997347, which aimed to help us
debug the failures that this commit is trying to fix. It's making
the buildfarm sad.

Discussion: http://postgr.es/m/CA+TgmobWFb8NqyfC31YnKAbZiXf9tLuwmyuvx=iYMXMniPQ4nw@mail.gmail.com
2024-01-31 10:12:53 -05:00
Robert Haas 5ddf997347 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
2024-01-26 13:25:19 -05:00
Robert Haas 237d01139b Fix typos.
Alexander Lakhin

Discussion: http://postgr.es/m/212b0987-83e5-e2ae-c5e8-b8170fdaf3a0@gmail.com
2024-01-15 11:50:44 -05:00
Alvaro Herrera 2f696d5a29
Add empty placeholder LINGUAS file for pg_walsummary
Like bbf1f13408.
2024-01-12 23:20:03 +01:00
Michael Paquier 278972f593 Fix pg_walsummary's .gitignore
It missed a entry for tmp_check/ generated by the tests.  While on it,
append a slash at the beginning of "pg_walsummary" to restrict its check
to the current directory, like anywhere else.

Oversights in ee1bfd1683.
2024-01-12 13:40:58 +09:00
Robert Haas a7097ca630 Try to fix pg_walsummary buildfarm failures.
Apparently the new tuple isn't guaranteed to end up at the end of
the relation, so make the test not depend on that happening.
2024-01-11 15:01:51 -05:00
Robert Haas ee1bfd1683 Add new pg_walsummary tool.
This can dump the contents of the WAL summary files found in
pg_wal/summaries. Normally, this shouldn't really be something anyone
needs to do, but it may be needed for debugging problems with
incremental backup, or could possibly be useful to external tools.

Discussion: http://postgr.es/m/CA+Tgmobvqqj-DW9F7uUzT-cQqs6wcVb-Xhs=w=hzJnXSE-kRGw@mail.gmail.com
2024-01-11 12:48:27 -05:00