Re: No error checking when reading from file using zstd in pg_dump - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: No error checking when reading from file using zstd in pg_dump
Date
Msg-id 43620562-DAC6-4AA3-BBF2-524069A41037@yesql.se
Whole thread Raw
In response to Re: No error checking when reading from file using zstd in pg_dump  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
> On 1 Jul 2025, at 17:11, Tomas Vondra <tomas@vondra.me> wrote:
> On 7/1/25 16:24, Daniel Gustafsson wrote:

>> This version has been tested against v17 and v16 where it applies and passes
>> all tests (the latter isn't as assuring as it should be since there is a lack
>> of testcoverage).
>
> Could you elaborate what you mean by lack of test coverage? Doesn't
> pg_dump have TAP tests exercising all compression methods? Perhaps it
> does not exercise all parts of the code, and we could improve that?

Sorry, I was unclear.  There are indeed lots of pg_dump tests and all
compression methods are tested (the 0% for Zstd on coverage.pg.org is due to
that instance not being compiled with zstd support) but there are functions
which evade testing like getc_func.  It's also quite hard to test all the error
paths as that would require some sort of fault injection.

I don't think the current coverage is cause for holding back this patch, but
there is room for improvement to made in the coming cycle.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: No error checking when reading from file using zstd in pg_dump
Next
From: Sami Imseih
Date:
Subject: Re: pg_get_multixact_members not documented