Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Postgres multidisk master replicating to single disk slave

$
0
0

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)?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>