Re: Does PostgreSQL check database integrity at startup?

From: Edson Carlos Ericksson Richter <richter(at)simkorp(dot)com(dot)br>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Does PostgreSQL check database integrity at startup?
Date: 2017-12-26 17:46:26
Message-ID: 7a6d1d6d-3627-c68c-1ce1-b681a7062930@simkorp.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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(at)$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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Steele 2017-12-26 21:42:38 Re: Does PostgreSQL check database integrity at startup?
Previous Message Alvaro Herrera 2017-12-26 17:13:27 Re: Does PostgreSQL check database integrity at startup?