4

I have an odd situation. I have a postgreSQL database master with multiple large tablespaces divided across 3 physical disks. I am setting up a slave that will be used to offload long, time-insensitive queries from the master.

Because time is not a concern on the slave, I have set up a machine with only one disk. However, when I try to set up replication, psql tries to mimic the structure on the master.

$ /usr/pgsql-9.2/bin/pg_basebackup -h [master] -D "/opt/database" -U [user]
pg_basebackup: could not create directory "/opt/archive-tables": permission denied

Because I have only one disk, I need all data to be stored in /opt/database (where the disk is mounted).

Is there some way to override the master tablespace structure and force everything to go into a single tablespace (or at least onto a single file location)?

asked Jul 2, 2014 at 19:11
0

1 Answer 1

1

Community Wiki answer generated from a question comment by a_horse_with_no_name

Create symbolic links on the slave that match the mount points of the tablespaces on the master.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.