On 12.02.26 21:08, Álvaro Herrera wrote:
> On 2026-Feb-13, Yasir wrote:
>
>> can we add alternative test output files for the changes caused by
>> different block sizes? E.g: the attached poc patch. Whether such an
>> approach would be acceptable?
>
> Absolutely not. For starters, how did you verify that these new files
> are correct? Second, I imagine this patch is just for this one file,
> but that there numerous other files that would have to be patched,
> right? If so, how many, and how extensive are the changes?
>
> If you wanted to propose some surgical interventions to the affected
> files that made the tests pass for other page sizes, then perhaps that
> could be entertained. Looking at the files you sent, I see that from
> the original to _2.out there are two plan changes (hash aggregates
> become group aggregates); then from _2.out to _1.out a single query
> changes from indexscan to bitmap scan; and lastly, from the original to
> _3.out there are some seqscans that become index scans. So if you were
> to propose a patch that adds a SET call to disable some plan type just
> before one query, and RESET it immediately after that query; and with
> such a change the test runs unchanged across all block sizes, then maybe
> that would be something we could consider. (However, getting a
> committer to review such changes might be a hard sell also -- no
> promises!)
>
> Also, if you find that you need too many changes of this kind in order
> to make this work, then that's probably not going to fly either.
AFAICT, the differences fall into three categories:
1) tests that intentionally test block size and related limits
2) printed plan changes
3) ordering changes (probably due to plan changes)
The first category might be worth fixing by parametrizing the tests on
the block size at run time. This would check that the various edge
cases also work correctly under different block sizes, which could be
valuable.
About the plan changes, I'm surprised that there are that many plan
changes. I wonder if it would help a bit to change some planner
settings like work_mem proportionally to the block size (either globally
or just for the tests).