From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Steeve Lennmark <steevel(at)handeldsbanken(dot)se> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Relocation of tablespaces in pg_basebackup |
Date: | 2014-02-16 00:05:11 |
Message-ID: | 530000B7.6000800@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
0001-pg_basebackup-Add-support-for-relocating-tablespaces.patch | text/x-diff | 11.0 KB |
pg_basebackup-T-tests.patch | text/x-diff | 2.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2014-02-16 00:18:02 | Re: New hook after raw parsing, before analyze |
Previous Message | Andres Freund | 2014-02-15 23:59:46 | Re: Changeset Extraction v7.6.1 |