From: Edson Carlos Ericksson Richter <richter@simkorp.com.br>
To: pgsql-general@lists.postgresql.org
Subject: Re: Does PostgreSQL check database integrity at startup?
Date: Tue, 26 Dec 2017 15:46:26 -0200
Message-ID: <7a6d1d6d-3627-c68c-1ce1-b681a7062930@simkorp.com.br> (raw)
In-Reply-To: <20171226171327.437beyi2dnndslwl@alvherre.pgsql>
References: <20171226171327.437beyi2dnndslwl@alvherre.pgsql>
Em 26/12/2017 15:13, Alvaro Herrera escreveu:
> Edson Carlos Ericksson Richter wrote:
>
>> I'm rebuilding the standby server for two days already, with 23% of
>> completion status...
> So how do you build your standbys, exactly? Maybe there's a bug in your
> procedure, rather than a bug in the software.
>
Usually, or by "pg_basebackup" or by "rsync" as described in PostgreSQL
Wiki.
Right now, I'm doing via pg_basebackup.
Nothing extraordinary.
When using rsync:
rsync -e "ssh -2 -C -p slave_ssh_port" --progress --partial -az
/pgsql/9.6/master_data_folder/*
superuser_name@$slave_host:/home/pgsql/9.6/slave_data_folder/ --exclude
postmaster.pid --exclude postgresql.conf --exclude pg_log
When using pg_basebackup:
/usr/pgsql-9.6/bin/pg_basebackup -h master_host -p master_port -D
/home/pgsql/9.6/master_data_folder -R -S slot_name -X stream -P -d "
user=superuser_name password=superuser_pass sslmode=require "
Of course, this is inside a bash script with variables at right places
to make script generic as needed to make it works with dozens of
databases...
Regards,
Edson
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: richter@simkorp.com.br
Subject: Re: Does PostgreSQL check database integrity at startup?
In-Reply-To: <7a6d1d6d-3627-c68c-1ce1-b681a7062930@simkorp.com.br>
References: <20171226171327.437beyi2dnndslwl@alvherre.pgsql> <7a6d1d6d-3627-c68c-1ce1-b681a7062930@simkorp.com.br>
* 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