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

Repmgr and server boot sequence #80

Closed
gp4git opened this issue Jun 15, 2015 · 3 comments
Closed

Repmgr and server boot sequence #80

gp4git opened this issue Jun 15, 2015 · 3 comments

Comments

@gp4git
Copy link

gp4git commented Jun 15, 2015

I would like to know if there is a best practice concerning start/stop boot sequence for PostgreSQL servers under repmgr ?
Is it OK if my server (master and slave) can automatically (re)boot in any order ?

Same question regarding the automated starting of repmgrd daemon at server boot start ?

Regards

@gp4git
Copy link
Author

gp4git commented Aug 12, 2015

Any reply ?
Regards

@ibarwick
Copy link
Collaborator

PostgreSQL - it doesn't matter which order the servers boot in; the standby (slave) will continuously try to connect to the upstream until it becomes available.

repmgrd - repmgrd needs to be able to connect to the primary (master) node, otherwise it will terminate; you'll need to ensure both primary and standby are running before starting repmgrd.

It does seem sensible to have repmgrd keep retrying for a certain period if the primary is unavailable; I'll add this to the todo list.

@wasiualhasib
Copy link

Unable to start repmgr-15.service on boot. I am not sure why it is not started. As per service it should start after postersql-15.service but it is not started. Somehow repmgr trying to connect before starting postgresql-15.service start. How can I solve this issue? All necessary command given at configuration file to start and stop repmgr and postgresql but where is the issue I could not understand. @ibarwick can you help me out on this issue?

[2023-02-06 02:04:19] [INFO] connecting to database "host=192.168.43.140 user=repmgr dbname=repmgr connect_timeout=6 port=5432"
[2023-02-06 02:04:19] [ERROR] connection to database failed
[2023-02-06 02:04:19] [DETAIL]
connection to server at "192.168.43.140", port 5432 failed: Network is unreachable
        Is the server running on that host and accepting TCP/IP connections?

[2023-02-06 02:04:19] [DETAIL] attempted to connect using:
  user=repmgr connect_timeout=6 dbname=repmgr host=192.168.43.140 port=5432 fallback_application_name=repmgr options=-csearch_path=

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

3 participants