From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Ying He <yinghe0101(at)yahoo(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_basebackup on standby node failed |
Date: | 2014-02-04 04:14:17 |
Message-ID: | CAB7nPqRTFWsTi4Czz7oavsjFGp9tUh_3LDSs7sMgjjtNNuWubQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Feb 4, 2014 at 5:51 AM, Ying He <yinghe0101(at)yahoo(dot)com> wrote:
> When I do:
> pg_basebackup -D /backupDir
>
> I am getting:
> pg_basebackup: directory "/usr/local/pgsql/data/pg_tblspc/tablespace1"
> exists but is not empty
>
> tablespace1 is a tablespace created by CREATE TABLESPACE and
> ""/usr/local/pgsql/data/pg_tblspc/tablespace1" is a symlink pointing to a
> dir which will always exists and not empty
Creating a tablespace *inside* PGDATA, which is what you seem to be
doing, is not good practice. Btw, it looks like you faced the bug of a
tablespace inside PGDATA fixed by this commit and back-patched down to
9.1:
commit b168c5ef2730d0ecaa7462f0b90345b0a3798c16
Author: Magnus Hagander <magnus(at)hagander(dot)net>
Date: Tue Jan 7 17:04:40 2014 +0100
Avoid including tablespaces inside PGDATA twice in base backups
If a tablespace was crated inside PGDATA it was backed up both as part
of the PGDATA backup and as the backup of the tablespace. Avoid this
by skipping any directory inside PGDATA that contains one of the active
tablespaces.
Dimitri Fontaine and Magnus Hagander
This will appear in the next minor release.
> I tried using -Ft -P, that works to create tar files in the /backupDir but
> pg_basebackup -D /backupDir -Ft -P -X s will fail with:
> pg_basebackup: wal streaming can only be used in plain mode
I see no problem with this error message. You are trying to create a
tarball and to stream xlog files at the same time.
Regards,
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | George Woodring | 2014-02-04 13:54:57 | Re: Server hanging with high CPU wait -- Checkpoint issue? |
Previous Message | Susan Cassidy | 2014-02-03 22:13:40 | Re: way to custom sort column by fixed strings, then by field's content |