[ADMIN] Tablespace symlinks - Mailing list pgsql-admin

From Slavcho Trnkovski
Subject [ADMIN] Tablespace symlinks
Date
Msg-id CACwHmfE6Cmzvmj9ELMYHqpdeg99oE5fu2vfSdmzUxssZhJ_qRw@mail.gmail.com
Whole thread Raw
Responses Re: [ADMIN] Tablespace symlinks  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-admin
Hi,
I'm using PostgreSQL 9.5.
As backup I use pg_basebackup with options --format=t -v -z -P .
These are the steps I do for restore:
1. 
tar -xzf base.tar.gz -C $PGDATA
2. 
for f in `ls | grep -v base.tar.gz `; do
echo "tar  -xf $f -C $PGDATA/pg_tblspc/`echo $f|cut -d'.' -f 1`" 
tar -xf $f -C $PGDATA/pg_tblspc/`echo $f|cut -d'.' -f 1`

done

I​ ha
​v​
e​
​ problem because ​symlinks for my tablespaces are not being created in step 1.

"When tar format mode is used, it is the user's responsibility to unpack each tar file before starting the PostgreSQL server. If there are additional tablespaces, the tar files for them need to be unpacked in the correct locations. In this case the symbolic links for those tablespaces will be created by the server according to the contents of the tablespace_map file that is included in the base.tar file."
my understanding is that these symbolic links should be created with the first step.

I was using same approach with PostgreSQL 9.4, and it was OK.

So, is this new behavior in 9.5 (so I shall handle it manually), or I am missing something?

Regards,
Slavcho


pgsql-admin by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [ADMIN] pg_hba.conf and hostssl all all 999.999.999.0/24 cert anduse of letsencrypt.org software
Next
From: Achilleas Mantzios
Date:
Subject: Re: [ADMIN] Tablespace symlinks