pgsql: Make recovery rename tablespace_map to *.old if backup_label is

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make recovery rename tablespace_map to *.old if backup_label is
Date: 2015-08-03 14:05:33
Message-ID: E1ZMGMv-0000GV-JI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make recovery rename tablespace_map to *.old if backup_label is not present.

If tablespace_map file is present without backup_label file, there is
no use of such file. There is no harm in retaining it, but it is better
to get rid of the map file so that we don't have any redundant file
in data directory and it will avoid any sort of confusion. It seems
prudent though to just rename the file out of the way rather than
delete it completely, also we ignore any error that occurs in rename
operation as even if map file is present without backup_label file,
it is harmless.

Back-patch to 9.5 where tablespace_map file was introduced.

Amit Kapila, reviewed by Robert Haas, Alvaro Herrera and me.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/46e9019bbce96c309d27d4b164bf9a2d0d8292eb

Modified Files
--------------
src/backend/access/transam/xlog.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2015-08-03 14:14:01 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Previous Message Heikki Linnakangas 2015-08-03 13:37:55 Re: pgsql: Fix pg_rewind when pg_xlog is a symlink.