Waiting for 9.4 – pg_basebackup: Add support for relocating tablespaces

pg_basebackup: Add support for relocating tablespaces
Tablespaces can be relocated in plain backup mode by specifying one or
more -T olddir=newdir options.
Author: Steeve Lennmark
Reviewed-by: Peter Eisentraut

Tablespaces are not among the most commonly used features of PostgreSQL, but they have their uses. Especially “in the cloud" where you can easily add new, fast, “disks" to machine, and might want to move some tables/indexes there.

So far, when you made pg_basebackup – you got your tablespaces exactly like it was on master.

Now, you can get backups (or new slaves) setup with tablespaces pointing to another directories. All without manual work and risk of damaging anything. Let's see how that works…