Hi,
On 2025-11-25 14:30:33 +0100, Álvaro Herrera wrote:
> I just noticed that one regress log file for the pg_dump test is about
> 7MB long because it contains totally unnecessary dump files in the
> regress log output. This is because the tests run pg_dump of schema
> pg_catalog without redirecting the output anywhere, which means it goes
> to stdout, and then `prove` helpfully puts it in the regress log file.
> This is completely pointless. We can make the log file 1 MB instead by
> adding a --file parameter to that command, as 0001 attached.
Yea, that makes no sense.
> We also have a couple of tests that leave rather large server logs
> behind that are perhaps not very useful. I would propose to run those
> servers with log_statement=off and avoid some of the bloat. 0002 does
> that.
>
> Another possible approach, instead of individually tweaking t/*.pl files
> to add 'log_statements=none', would be to set it that way in
> PostgreSQL::Test::Cluster globally. Right now we have
> log_statements=all there, but maybe that was not a great idea.
I think that be a bad idea - many tests are essentially undebuggable that way
because there's no other way to correlate the regress_log and the server log
than the statement log.
TBH, I have even needed the pg_dump log_statement output on the buildfarm to
debug issues :(
I am against doing this for 027_stream_regress.pl, it's definitely
undebuggable without the statement logs.
Greetings,
Andres Freund