On 5/12/25 16:04, Maxim Boguk wrote:
On Mon, May 12, 2025 at 4:48 PM Andrei Lepikhov <lepi...@gmail.com If I'm not mistaken, it will work with all PG versions that are
    currently in support. What do you think?


Such extension would be very useful (and in general - the solution based on the actual execution data - seems more stable/predictable than the plan cost based selection which is currently used by postgresql).
I've written a sketch of such an extension; see [1]. A trivial strategy is implemented to force prepared statements to use a generic plan if the planning time exceeds the maximum execution time. It is just an example - it is written in plpgsql, and you can implement alternative strategies independently.
I would be happy if it covered your use case. Any feedback is welcome.

[1] https://github.com/danolivo/pg_mentor/tree/main

--
regards, Andrei Lepikhov


Reply via email to