Re: Postgresql Bug Report - Mailing list pgsql-bugs

From Julien Rouhaud
Subject Re: Postgresql Bug Report
Date
Msg-id CAOBaU_aXaue6Lakp76PMsUxM-70uLYUpWfUzQztPnfZma7ApEw@mail.gmail.com
Whole thread Raw
In response to Postgresql Bug Report  (İsmet BALAT <bcalbatros@gmail.com>)
Responses Re: Postgresql Bug Report  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-bugs
On Tue, Sep 22, 2020 at 7:36 PM İsmet BALAT <bcalbatros@gmail.com> wrote:
>
> Hi Julien,
>
> Thanks for the reply. My log in addition. I did;
> 1- rm -fr /var/lib/pgsql/12/data/*
> 2- /usr/pgsql-12/bin/pg_basebackup --host=master_ip --pgdata=/var/lib/pgsql/12/data/ --username=replica_user
--verbose--progress --wal-method=stream --write-recovery-conf --checkpoint=fast --create-slot --slot=ha_slot 
> 3- systemctl restart postgresql-12
> 4- Crush :/
>
> But I tried same steps and all of this and avarage 8-success, 2-this fail. I don't understand because I did same
everthingof steps. 
>
> Thank you for now.

It seems that you have an issue with your procedure, as the logs show:

2020-09-22 14:23:59.041 +03 [5045] FATAL:  database system identifier
differs between the primary and standby
2020-09-22 14:23:59.041 +03 [5045] DETAIL:  The primary's identifier
is 6875268062102845505, the standby's identifier is
6875268050644555587.
[...]
2020-09-22 14:30:27.418 +03 [9247] LOG:  database system was shut down
in recovery at 2020-09-22 14:30:27 +03
2020-09-22 14:30:27.419 +03 [9247] LOG:  entering standby mode
2020-09-22 14:30:27.419 +03 [9247] LOG:  invalid primary checkpoint record
2020-09-22 14:30:27.419 +03 [9247] PANIC:  could not locate a valid
checkpoint record
2020-09-22 14:30:28.913 +03 [9244] LOG:  startup process (PID 9247)
was terminated by signal 6: Aborted
2020-09-22 14:30:28.913 +03 [9244] LOG:  aborting startup due to
startup process failure
2020-09-22 14:30:29.008 +03 [9244] LOG:  database system is shut down

I see that your step 3 is to *restart* the postgres service.  Are you
executing the pg_basebackup command (and removing the data) while the
server is running?  If yes don't search any further, that can't work.



pgsql-bugs by date:

Previous
From: İsmet BALAT
Date:
Subject: Re: Postgresql Bug Report
Next
From: Julien Rouhaud
Date:
Subject: Re: Postgresql Bug Report