On 07.04.26 16:25, Jelte Fennema-Nio wrote:
On Tue, 7 Apr 2026 at 15:15, Peter Eisentraut <[email protected]> wrote:
I could see this maybe being useful if the entire diff file is, say,
less than 50 lines.  But I don't see how seeing a truncated diff by
default can be useful.

The idea behind that is that if it's a big diff it's often because the
server crashed. And the top of the diff will then tell you which query
crashed the server.

That is not my experience. Often times, when a test out of a group of 20 crashes, then the crashing test will hang for a while while the core file is being written out, while the other 19 tests fail immediately because of the server restart. And so the top of the diff will just show all the other tests aborting, not the actual crashing test.

Are you saying that 80 diff lines are too many? And to limit it to 40
or 50 instead by default. Could you try changing the number locally
and if that would address the annoyance? Or would it only be solved by
having no diff output at all? And would being able to configure the
amount of lines using a env variable help?

80 is too many. I have a reasonably big monitor, and my echo $LINES says 60. On the laptop screen it's 40. And you need to leave some room so that the summary of the test run can be shown, so like 10 lines. So I think 25 or 30 is about the maximum that would be reasonable. (Or you actually take getenv("LINES") into account.)

But again, one of the problems is that the diff lines could be longer than the terminal width, and then these computations no longer work. If you look at the diffs with "less" or similar, then you can manage that. If you could print the start of the diff while truncating it to the terminal line length, then that could work.


Independent of that, there appears to be a technical problem with the implementation. Consider a recent failed build on the buildfarm:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dodo&dt=2026-04-07%2012%3A45%3A07

The buildfarm output actually handles this quite nicely: The bottom of the output contains the test result summary, and if you want to know more detail, you click on the links right below.

But note that the additional diff output appears somewhere in the middle of the test run. There appears to be a problem synchronizing multiple output streams.

(But also note that this new feature is possibly redundant with what the buildfarm output already provides, so it might be worth configuring this differently for the buildfarm client.)



Reply via email to