On Thu, 15 Dec 2022 at 18:26, David Rowley <dgrowle...@gmail.com> wrote: > I propose the attached which gets rid of the not-so-great casting > method that was originally added to this test to try and force the seq > scan. It seems a little dangerous to put in hacks like that to force > a particular plan when the resulting plan ends up penalized with a > (1.0e10) disable_cost. The planner is just not going to be stable > when the plan includes such a large penalty. To force the planner, > I've added another test step to do set enable_seqscan to true and > adjusted the permutations to run that just before preparing the seq > scan query.
Pushed and backpatched to 13, where incremental sorts were added. David