From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Csaba Ragasits <ragasits.csaba@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_basebackup + SSL error: bad length
Date: Tue, 28 Aug 2018 06:53:36 -0700
Message-ID: <41761a1a-ca9e-e712-96ae-eff259e39c7a@aklaver.com> (raw)
In-Reply-To: <CANaXbVhLXdmFfCNBpXh+s+6RgnqOt8UHJDtk+bBvpFiKfbt38A@mail.gmail.com>
References: <CANaXbVhwH83911ZMk_eqnnsuz8ircm1rYwnQV_jPea7pKkExRg@mail.gmail.com>
<bb5017d0-8b69-0f01-6ff5-2ae9daea6a6f@aklaver.com>
<CANaXbViHwjsJpSscDGoXz2Yu0b-gaW=GPU3phzEBEbgLtRpwew@mail.gmail.com>
<f15e7eba-1c7c-485c-36fe-9f29be39b8c6@aklaver.com>
<20180828024924.GD29157@paquier.xyz>
<CANaXbVhLXdmFfCNBpXh+s+6RgnqOt8UHJDtk+bBvpFiKfbt38A@mail.gmail.com>
On 08/28/2018 01:58 AM, Csaba Ragasits wrote:
> Hello,
>
> Only one copy is from the pg_basebackup on the machines.
>
> I have only a tablespace only a different location:
> /srv/pgdata/tbs_int303
>
> I think I solved the problem:
>
> When I delete manually the /srv/pgdata/tbs_int303 folder, the
> pg_basebackup is running fine.
Was this tablespace active?
Went back to your original post and realized I skipped over this:
"pg_basebackup: directory "/srv/pgdata/tbs_int302" exists but is not empty
pg_basebackup: removing data directory "./main":
Is /srv/pgdata/tbs_int302 a tablespace also?
Found this:
https://www.postgresql.org/docs/10/static/app-pgbasebackup.html
"Tablespaces will in plain format by default be backed up to the same
path they have on the server, unless the option --tablespace-mapping is
used. Without this option, running a plain format base backup on the
same host as the server will not work if tablespaces are in use, because
the backup would have to be written to the same directory locations as
the original tablespaces."
Looks like you need to use:
-T olddir=newdir
--tablespace-mapping=olddir=newdir
>
> Thank you for your help,
> Csaba
>
>
> 2018-08-28 4:49 GMT+02:00 Michael Paquier <michael@paquier.xyz
> <mailto:michael@paquier.xyz>>:
>
> On Mon, Aug 27, 2018 at 04:40:34PM -0700, Adrian Klaver wrote:
> > Is there more then one copy of pg_basebackup on the machines?
>
> Or this user has created a tablespace directly in the main data folder,
> which can cause pg_basebackup to fail because of recursion issues. It
> is no wonder that a WARNING is created during a CREATE TABLESPACE if you
> do that.
> --
> Michael
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, ragasits.csaba@gmail.com
Subject: Re: pg_basebackup + SSL error: bad length
In-Reply-To: <41761a1a-ca9e-e712-96ae-eff259e39c7a@aklaver.com>
References: <CANaXbVhwH83911ZMk_eqnnsuz8ircm1rYwnQV_jPea7pKkExRg@mail.gmail.com> <bb5017d0-8b69-0f01-6ff5-2ae9daea6a6f@aklaver.com> <CANaXbViHwjsJpSscDGoXz2Yu0b-gaW=GPU3phzEBEbgLtRpwew@mail.gmail.com> <f15e7eba-1c7c-485c-36fe-9f29be39b8c6@aklaver.com> <20180828024924.GD29157@paquier.xyz> <CANaXbVhLXdmFfCNBpXh+s+6RgnqOt8UHJDtk+bBvpFiKfbt38A@mail.gmail.com> <41761a1a-ca9e-e712-96ae-eff259e39c7a@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox