Re: [PATCH] Relocation of tablespaces in pg_basebackup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Relocation of tablespaces in pg_basebackup
Date
Msg-id 530000B7.6000800@gmx.net
Whole thread Raw
In response to Re: [PATCH] Relocation of tablespaces in pg_basebackup  (Steeve Lennmark <steevel@handeldsbanken.se>)
Responses Re: [PATCH] Relocation of tablespaces in pg_basebackup  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I've been working on your patch.  Attached is a version I'd be happy to
commit.  Please check that it's okay with you.

I rewrote the option argument parsing logic a little bit to be more
clear and provide more specific error messages.

I reinstated the requirement that both old and new directory are
absolute.  After consideration, I think this makes sense because all
tablespace directories are always required to be absolute in other
contexts.  (Note: Checking for absolute path by testing the first
character for '/' is not portable.)

I also removed the partial matching.  This would have let -T /data1=...
also match /data11, which is clearly confusing.  This logic would need
some intelligence about slashes, similar to fnmatch().  This could
perhaps be added later.

Finally, I wrote some test cases for this new functionality.  See the
attached patch, which can be applied on top of
<https://commitfest.postgresql.org/action/patch_view?id=1394>.

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Changeset Extraction v7.6.1
Next
From: Greg Stark
Date:
Subject: Re: New hook after raw parsing, before analyze