hapostgres / hapostgres/pg_auto_failover

pg_autoctl.state of Standby site is removed accidentally

Open
#994 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.4k
Forks
142
Avg merge
5h 8m
Merged PRs (30d)
1

Description

The state of node_2 under .local/share/pg_autoctl/u01/pgdata/13/data/pg_autoctl.state is removed accidentally. Hence, the postgresql of node_2 cannot be started after running "sudo systemctl restart pgautofailover", is there any way to fix let node_2 become read-only with connection again? Thank you.

Here has more information

pg_autoctl show state
Name | Node | Host:Port | TLI: LSN | Connection | Reported State | Assigned State
-------+-------+--------------+------------------+--------------+---------------------+--------------------
node_1 | 1 | pabdb1s:5432 | 13: 1B/84E686C0 | read-write | wait_primary | wait_primary
node_2 | 2 | pabdb1p:5432 | 13: 1B/7C774000 | read-only ! | secondary | catchingup

pg_autoctl show settings
Context | Name | Setting | Value
----------+---------+---------------------------+------
formation | default | number_sync_standbys | 0
primary | node_1 | synchronous_standby_names | ''
node | node_1 | candidate priority | 0
node | node_2 | candidate priority | 0
node | node_1 | replication quorum | true
node | node_2 | replication quorum | true

pg_autoctl --version
pg_autoctl version 1.6.3
pg_autoctl extension version 1.6
compiled with PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
compatible with Postgres 10, 11, 12, 13, and 14

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.