Re: pg_rewind fails with in-place tablespace

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: 赵锐(惜元) <xiyuan(dot)zr(at)alibaba-inc(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: pg_rewind fails with in-place tablespace
Date: 2023-07-25 07:36:42
Message-ID: ZL97ijwFAN+Z1Yqd@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 19, 2023 at 09:31:35PM +0800, 赵锐(惜元) wrote:
> Recently I encountered an issue: pg_rewind fails when dealing with
> in-place tablespace. The problem seems to be that pg_rewind is
> treating in-place tablespace as symbolic link, while in fact it
> should be treated as directory.
> Here is the output of pg_rewind:
> pg_rewind: error: file "pg_tblspc/16385" is of different type in
> source and target
> To help reproduce the failure, I have attached a tap test. And I am
> pleased to say that I have also identified a solution for this
> problem, which I have included in the patch.
> Thank you for your attention to this matter.

Issue reproduced here, and agreed that we'd better do something about
that. I am not sure if your patch is right for the job though, but
I'll try to study that a bit more.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-07-25 07:39:58 Retiring is_pushed_down
Previous Message Michael Paquier 2023-07-25 07:03:22 Re: WaitForOlderSnapshots in DETACH PARTITION causes deadlocks