Re: [PATCH] Relocation of tablespaces in pg_basebackup

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Steeve Lennmark <steevel(at)handeldsbanken(dot)se>
Cc: 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-01-13 03:29:10
Message-ID: 52D35D86.8020100@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/09/2014 10:10 PM, Steeve Lennmark wrote:
> That's a much better solution, I attached a patch with the updated code.
>
> # SELECT oid, pg_tablespace_location(oid) FROM pg_tablespace;
> [...]
> 16388 | /tmp/tblspc1
> 16389 | /tmp/tblspc2
>
> $ pg_basebackup -Xs -D backup/data -T /tmp/tblspc1:$(pwd)/backup/t1 -T
> /tmp/tblspc2:$(pwd)/backup/t2
>
> This produces the following now:
> $ ls backup/; ls -l backup/data/pg_tblspc/
> data t1 t2
> lrwxrwxrwx 1 steevel users 23 Jan 9 20:41 16388 -> /home/steevel/backup/t1
> lrwxrwxrwx 1 steevel users 23 Jan 9 20:41 16389 -> /home/steevel/backup/t2

Looked at the patch quickly and noticed that it does not support paths
containing colons. Is that an acceptable limitation? The $PATH variable
in most UNIX shells does not support paths with colons either so such
naming of directories is already discouraged.

Feel free to add the patch to the upcoming commitfest when you feel it
is ready for a review.

--
Andreas Karlsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2014-01-13 03:35:16 Re: Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Previous Message Craig Ringer 2014-01-13 03:22:25 Re: Compiling extensions on Windows