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

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, 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 12:59:50
Message-ID: CAKAnmmLr0q4ZVWwZWrgEaBh7ec61VPP5eQ3UGED59kC80jdrGQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> 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?

Cheers,
Greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2026-11-20 13:07:25 Re: Use local buffer for packed numerics
Previous Message Daniel Gustafsson 2026-11-20 12:40:28 Re: [PATCH] pg_upgrade: add --initdb option to create the new cluster automatically