Re: Postgresql Bug Report

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: İsmet BALAT <bcalbatros(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgresql Bug Report
Date: 2020-09-22 11:52:10
Message-ID: CAOBaU_aXaue6Lakp76PMsUxM-70uLYUpWfUzQztPnfZma7ApEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Sep 22, 2020 at 7:36 PM İsmet BALAT <bcalbatros(at)gmail(dot)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 everthing of 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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien Rouhaud 2020-09-22 13:03:53 Re: Postgresql Bug Report
Previous Message İsmet BALAT 2020-09-22 11:36:27 Re: Postgresql Bug Report