From: | Paul Förster <paul(dot)foerster(at)gmail(dot)com> |
---|---|
To: | Andrus <kobruleht2(at)hot(dot)ee> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated |
Date: | 2020-06-01 10:44:07 |
Message-ID: | 58EE62CB-0436-41DF-A97F-6A2F07FB48FF@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Andrus,
> On 01. Jun, 2020, at 12:26, Andrus <kobruleht2(at)hot(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2020-06-01 10:56:56 | Re: Vanishing unique constraint |
Previous Message | Andrus | 2020-06-01 10:26:12 | Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated |