Re: pg_upgrade fails with in-place tablespace

From: "Rui Zhao" <xiyuan(dot)zr(at)alibaba-inc(dot)com>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>
Cc: "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade fails with in-place tablespace
Date: 2023-08-18 14:47:04
Message-ID: a3cb4fcb-775c-482d-83e0-01ff64a4aaea.xiyuan.zr@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 09, 2023 at 09:20 AM +0800, Michael Paquier wrote:
> This does not really explain the reason why in-place tablespaces need
> to be skipped (in short they don't need a separate creation or check
> like the others in create_script_for_old_cluster_deletion because they
> are part of the data folder). Anyway, the more I think about it, the
> less excited I get about the need to support pg_upgrade with in-place
> tablespaces, especially regarding the fact that the patch blindly
> enforces allows_in_place_tablespaces, assuming that it is OK to do so.
> So what about the case where one would want to be warned if these are
> still laying around when doing upgrades? And what's the actual use
> case for supporting that? There is something else that we could do
> here: add a pre-run check to make pg_upgrade fail gracefully if we
> find in-place tablespaces in the old cluster.
I have implemented the changes you suggested in our previous discussion. I have added the necessary code to ensure that pg_upgrade fails gracefully with in-place tablespaces and reports a hint to let the check pass.
Thank you for your guidance and support. Please review my latest patch.
--
Best regards,
Rui Zhao

Attachment Content-Type Size
0001-Fix-pg_upgrade-with-in-place-tablespaces.patch application/octet-stream 4.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-08-18 16:01:11 Re: should frontend tools use syncfs() ?
Previous Message Hayato Kuroda (Fujitsu) 2023-08-18 13:51:36 RE: [PoC] pg_upgrade: allow to upgrade publisher node