| From: | Илья Чердаков <i(dot)cherdakov(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | postgres(at)jeltef(dot)nl |
| Subject: | Environment variable to disable diffs file output |
| Date: | 2026-04-06 07:55:25 |
| Message-ID: | ba567012-bff5-465a-8ee7-913b32f45d89@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greetings!
I'd like to add a environment variable to the patch to
disable diff output. Sometimes you have to be creative
with exploratory testing, modifying test files, etc.,
and multiple diff outputs can become a nuisance. This
doesn't change the default behavior, but it does give
you control over diff output in tests for specific
scenarios where a large number of failures are expected
(mass runs or exploratory testing with changing tests).
The env usage and implementation are somewhat similar
to PG_REGRESS_DIFF_OPTS
PG_REGRESS_DISABLE_DIFFS_OUTPUT=1 make check -s.
For now, I suggest to simply disabling it, but I'm also
considering passing the number of lines to output via env
or via flag pg_regress instead of completely disabling it.
Something like
PG_REGRESS_DIFFS_NUMBER_LINES_OUTPUT=20 make check
and then when an error occurs, 20 lines will be output
instead of the default 80. Setting it to 0 disables
diffs output.
I think this small addition will be useful for many
developers, especially testers.
---
This is my first patch. I welcome critique and comments.
Best regards,
Ilya Cherdakov, PostgresPro
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Adding-env-disables-diff-output.patch | text/plain | 1013 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2026-04-06 08:11:03 | Clean up remove_rel_from_query() after self-join elimination commit |
| Previous Message | Xuneng Zhou | 2026-04-06 07:15:15 | Re: Implement waiting for wal lsn replay: reloaded |