From: Paul Förster <paul.foerster@gmail.com>
To: Andrus <kobruleht2@hot.ee>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
Date: Mon, 1 Jun 2020 12:44:07 +0200
Message-ID: <58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.com> (raw)
In-Reply-To: <D1C2C9E316ED41149A8D2C5751797621@dell2>
References: <26EC9619620649D1B55C9C95811E4ADB@dell2>
<B7E0C7C6-865B-4632-B10A-11B2E468D40A@gmail.com>
<69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2>
<EBFD984A-90DC-4C6A-A6D8-233F08472C31@gmail.com>
<DC1BA2AF303246A3A349C8B0F8B01E1D@dell2>
<8BAE2216-8683-4DEE-8529-14457F2775BC@gmail.com>
<D1C2C9E316ED41149A8D2C5751797621@dell2>
Hi Andrus,
> On 01. Jun, 2020, at 12:26, Andrus <kobruleht2@hot.ee> wrote:
> My script does the same thing as your comands.
no, it does not. And as long as you refuse to understand that, I can't help you.
> I want to create replication server.
no, you want to create a streaming replica.
> Old cluster is empty, from initdb. Backup is not needed
then why the mv stuff?
> pg_basebackup uses environment varuables if not specified in command line. So my script does the same thing.
have you looked at the other options?
> I tried
> sudo --user=postgres pg_basebackup ....
> but got error
> could not change directory to "/root": Permission denied
try
sudo su - postgres pg_basebackup ....
Note the "-"! It's essential to get the environment of postgres, which is what you want.
Cheers,
Paul
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: paul.foerster@gmail.com, kobruleht2@hot.ee
Subject: Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
In-Reply-To: <58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.com>
References: <26EC9619620649D1B55C9C95811E4ADB@dell2> <B7E0C7C6-865B-4632-B10A-11B2E468D40A@gmail.com> <69FF4F48E6FE4A63A2EBD820C5B2B3A3@dell2> <EBFD984A-90DC-4C6A-A6D8-233F08472C31@gmail.com> <DC1BA2AF303246A3A349C8B0F8B01E1D@dell2> <8BAE2216-8683-4DEE-8529-14457F2775BC@gmail.com> <D1C2C9E316ED41149A8D2C5751797621@dell2> <58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.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