On Sun, Apr 14, 2024 at 6:33 PM Andres Freund <and...@anarazel.de> wrote:
> - Some of the new walsummary code could use more tests.
>   
> https://anarazel.de/postgres/cov/16-vs-HEAD-2024-04-14/src/backend/backup/walsummaryfuncs.c.gcov.html#L69

So this is pg_wal_summary_contents() and
pg_get_wal_summarizer_state(). I was reluctant to try to cover these
because I thought it would be hard to get the tests to be stable. The
difficulties in stabilizing src/bin/pg_walsummary/t/002_blocks.pl seem
to demonstrate that this concern wasn't entire unfounded, but as far
as I know that test is now stable, so we could probably use the same
technique to test pg_wal_summary_contents(), maybe even as part of the
same test case. I don't really know what a good test for
pg_get_wal_summarizer_state() would look like, though.

>   
> https://anarazel.de/postgres/cov/16-vs-HEAD-2024-04-14/src/bin/pg_combinebackup/pg_combinebackup.c.gcov.html#L424

I guess we could test this by adding a tablespace, and a tablespace
mapping, to one of the pg_combinebackup tests.

>   
> https://anarazel.de/postgres/cov/16-vs-HEAD-2024-04-14/src/common/blkreftable.c.gcov.html#L790

This is dead code. I thought we might need to use this as a way of
managing memory pressure, but it didn't end up being needed. We could
remove it, or mark it #if NOT_USED, or whatever.

-- 
Robert Haas
EDB: http://www.enterprisedb.com


Reply via email to