Postgresql Bug Report

Started by İsmet BALATover 5 years ago6 messagesbugs
Jump to latest
#1İsmet BALAT
bcalbatros@gmail.com

Hi,

Hi, I have an #bug #problem. It's occur *pg_basebackup* and systemctl
restart postgresql-12 . How can I repair it?

Attachments:

dumped.pngimage/png; name=dumped.pngDownload
#2Julien Rouhaud
rjuju123@gmail.com
In reply to: İsmet BALAT (#1)
Re: Postgresql Bug Report

Hi,

On Tue, Sep 22, 2020 at 4:09 PM İsmet BALAT <bcalbatros@gmail.com> wrote:

Hi,

Hi, I have an #bug #problem. It's occur pg_basebackup and systemctl restart postgresql-12 . How can I repair it?

The reason for this problem should be given in the postgres logs.
Could you show us the relevant extract?

#3İsmet BALAT
bcalbatros@gmail.com
In reply to: Julien Rouhaud (#2)
Re: Postgresql Bug Report

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.

Julien Rouhaud <rjuju123@gmail.com>, 22 Eyl 2020 Sal, 11:13 tarihinde şunu
yazdı:

Show quoted text

Hi,

On Tue, Sep 22, 2020 at 4:09 PM İsmet BALAT <bcalbatros@gmail.com> wrote:

Hi,

Hi, I have an #bug #problem. It's occur pg_basebackup and systemctl

restart postgresql-12 . How can I repair it?

The reason for this problem should be given in the postgres logs.
Could you show us the relevant extract?

Attachments:

postgresql-Tue.logapplication/octet-stream; name=postgresql-Tue.logDownload
#4Julien Rouhaud
rjuju123@gmail.com
In reply to: İsmet BALAT (#3)
Re: Postgresql Bug Report

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 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.

#5Julien Rouhaud
rjuju123@gmail.com
In reply to: Julien Rouhaud (#4)
Re: Postgresql Bug Report

On Tue, Sep 22, 2020 at 7:52 PM Julien Rouhaud <rjuju123@gmail.com> wrote:

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 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.

For the archive's sake, OP did confirm that stopping postgres before
step 1 fixed the issue.

#6İsmet BALAT
bcalbatros@gmail.com
In reply to: Julien Rouhaud (#5)
Re: Postgresql Bug Report

Great, thanks for the update.

Julien Rouhaud <rjuju123@gmail.com>, 22 Eyl 2020 Sal, 16:04 tarihinde şunu
yazdı:

Show quoted text

On Tue, Sep 22, 2020 at 7:52 PM Julien Rouhaud <rjuju123@gmail.com> wrote:

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 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.

For the archive's sake, OP did confirm that stopping postgres before
step 1 fixed the issue.