Sometimes, you run across traces of LarryDB. One typical one is a profusion of tablespaces.
Until you solve that problem, you'll need to deal with them. Let's take setting up a warm standby.
First, you need to find those tablespaces. This is simpler than it first appears:
SELECT spclocation FROM pg_catalog.pg_tablespace WHERE length(spclocation) > 0
Next, let's try a sanity check in bash.
GET_TB="SELECT spclocation FROM pg_catalog.pg_tablespace WHERE length(spclocation) > 0"
for tablespace in $(psql -Atc "${GET_TB}") do
echo ${tablespace}
done
Now that you've established that you can find those pesky tablespaces,
you can run the on the replica to pull from the master:
GET_TB="SELECT spclocation FROM pg_catalog.pg_tablespace WHERE length(spclocation) > 0"
for tablespace in $(psql -h master.host.dom -Atc "${GET_TB}") do
rsync -aPvz master.host.dom:${tablespace}/ ${tablespace}/
done
Since you're pulling, you need to make sure that psql is
talking to the appropriate host.
If you'd rather push than pull, you'd run this instead on the master:
GET_TB="SELECT spclocation FROM pg_catalog.pg_tablespace WHERE length(spclocation) > 0"
for tablespace in $(psql -Atc "${GET_TB}") do
rsync -aPvz ${tablespace}/ replica.host.dom:${tablespace}/
done
http://sdamkvartiry.com/