Re: [PATCH] pg_upgrade: add --initdb option to create the new cluster automatically

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: shihao zhong <zhong950419(at)gmail(dot)com>, Bohyun Lee <bohyun(dot)lee(at)databricks(dot)com>, Harrison Booth <harrisontbooth(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pg_upgrade: add --initdb option to create the new cluster automatically
Date: 2026-11-20 13:11:29
Message-ID: 9c93f977-d2c5-40b4-b533-1c718e5ddb32@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-11-20 13:11:52 Re: Parallel GIN, BRIN builds fail to maintain ii_BrokenHotChain
Previous Message Andrei Lepikhov 2026-11-20 13:07:25 Re: Use local buffer for packed numerics