Re: pg_basebackup vs. Windows and tablespaces - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_basebackup vs. Windows and tablespaces
Date
Msg-id 20141114183300.GM1791@alvin.alvh.no-ip.org
Whole thread Raw
In response to Re: pg_basebackup vs. Windows and tablespaces  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pg_basebackup vs. Windows and tablespaces  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila wrote:

> 2. Symlink file format:
> <oid> <linkpath>
> 16387 E:\PostgreSQL\tbs
> 
> Symlink file will contain entries for all the tablspaces
> under pg_tblspc directory.  I have kept the file name as
> symlink_label (suggestion are welcome if you want some
> different name for this file).

I think symlink_label isn't a very good name.  This file is not a label
in the sense that backup_label is; it seems more a "catalog" to me.  And
it's not, in essence, about symlinks either, but rather about
tablespaces.  I would name it following the term "tablespace catalog" or
some variation thereof.

I know we don't expect that users would have to look at the file or edit
it in normal cases, but it seems better to make it be human-readable.  I
would think that the file needs to have tablespace names too, then, not
just OIDs.  Maybe we don't use the tablespace name for anything other
than "documentation" purposes if someone decides to look at the file, so
perhaps it should look like a comment:

<oid>    <link path>    ; <tablespace name>

We already do this in pg_restore -l output IIRC.

One use case mentioned upthread is having the clone be created in the
same machine as the source server.  Does your proposal help with it?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_basebackup vs. Windows and tablespaces
Next
From: Andres Freund
Date:
Subject: Re: PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.