On 20/11/2026 14:59, Greg Sabino Mullane wrote:
    In the spirit of taking a step back, do we know that initdb is the
    only operation which the external scripts would like some controll
    around?  What if we defined the upgrade in terms of stages, where a
    stage can either be a single operation (like initdb) or multiple
    operations in sequence.  External scripts could then drive the
    upgrade process by calling the stages in order, and have
    the option to perform their own processing between the stages.


Not completely opposed, but I am wary of contorting ourselves too much for the benefit of third-party software. Every step in which we allow people to do something increases the chance that something will go wrong with the actual upgrade. Can someone provide a use case of something that must happen post-initdb but pre-upgrade, that could not simply be done post-upgrade?

Setting shared_preload_libraries in the config file. If you're using an extension that needs to be loaded from shared_preload_libraries, restoring the dump will fail if you don't set shared_preload_libraries between those steps.

Things like that.

- Heikki



Reply via email to