Re: No error checking when reading from file using zstd in pg_dump
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Tomas Vondra <tomas@vondra.me>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Evgeniy Gorbanev <gorbanyoves@basealt.ru>,
pgsql-hackers@lists.postgresql.org
Date: 2025-07-01T15:18:41Z
Lists: 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
Commits
-
pg_dump: Fix compression API errorhandling
- ec017a305bd4 16.11 landed
- e686010c5b47 19 (unreleased) landed
- 92268b35d04c 17.7 landed
- 8980c724b559 18.0 landed