Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_autoctl.state of Standby site is removed accidentally #994

Open
curtis18 opened this issue Jun 1, 2023 · 0 comments
Open

pg_autoctl.state of Standby site is removed accidentally #994

curtis18 opened this issue Jun 1, 2023 · 0 comments

Comments

@curtis18
Copy link

curtis18 commented Jun 1, 2023

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

@curtis18 curtis18 changed the title Standby site of pg_autoctl.state is removed accidentally pg_autoctl.state of Standby site is removed accidentally Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant