On Wed, Aug 12, 2026 at 9:28 AM Hüseyin Demir <[email protected]> wrote:

> When I run the pg_upgrade command with the following options I'd
> expect it to not create a directory and initdb.
>
> ```
> pg_upgrade --check --initdb -d /old -D /new
> ```
>

I see your point. Maybe we don't allow --check with --initdb at all?

also mention that -B flag points outs to target version correctly
> since there is a risk of doing an initdb with the wrong version. If -B
> points to an older version, pg_upgrade may create the wrong cluster.
>

I'm not clear what pointing this out for --initdb only accomplishes. A
wrong -B is going to cause problems regardless of the mode.

And the --initdb behaviour will introduce additional risks during the
> upgrade. During the initdb the settings discovery connections are
> allowed on database level and we don't have a guarantee that
> checkpoint and vacuums won't start. This needs to be documented
> clearly or we should consider eliminating them.
>

Eliminating what exactly? And why would a vacuum or checkpoint cause
problems?

Cheers,
Greg

Reply via email to