Re: Problems starting slave - Mailing list pgsql-general

From Ron
Subject Re: Problems starting slave
Date
Msg-id 07295fb2-aaef-8d3c-18ef-ffd8cdb1de11@gmail.com
Whole thread Raw
In response to Problems starting slave  (Douglas Reed <dougreed765@yahoo.com>)
List pgsql-general
On 10/2/23 09:38, Douglas Reed wrote:
Hi guys

The servers are virtual running on Nutanix

We are running Pg version 12 (12.10)

On Linux km-data1.rs.fsbtech.com 5.4.191-1.el7.elrepo.x86_64 #1 SMP Tue Apr 26 12:14:16 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

48G/16 x CPU (Master and slave)

Timeline

System had a number of issues due to kafka and slots, would not always shut down correctly. Several incidents where it had to be forced.
Found corruption on a number of indexes and tables. Decided to recover from a backup (barman). Due to missing wal file restored data up
to about three hours prior to expectation but it's working.

Attempts to build a slave;

On the slave at first we got error messages from pg_basebackup stating that the target directory was not empty;

    pg_basebackup: error: directory "/var/lib/pgsql/12/data" exists but is not empty

Although the directory /var/lib/pgsql/12/data was empty (using rm -r ....). Finally deleted the data directory and re-created ensuring that
perms were same. Restore started successfully and completed with error=0.


What was the full pg_basebackup command, including all options?

--
Born in Arizona, moved to Babylonia.

pgsql-general by date:

Previous
From: Sergey Cherukhin
Date:
Subject: Re: Operating of synchronous master when no standby is available
Next
From: Ron
Date:
Subject: Re: specifying multiple options in URI psql behaviour?