-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
postgresql_info: provide pg_is_in_recovery() #1068
Comments
Files identified in the description: If these files are inaccurate, please update the |
!component =plugins/modules/database/postgresql/postgresql_info.py |
Files identified in the description: If these files are inaccurate, please update the |
@phemmer hi, thanks for the feedback! Sounds good. |
I'm working on this |
That was fast. Probably would have gotten to it myself eventually, but who knows when that would have been :-) |
@phemmer thanks for the idea! Next community.general release will be ~at the end of November, so you can install the collection from galaxy and use then. |
SUMMARY
The
postgresql_info
module should provide a variable containing the result ofselect pg_is_in_recovery()
.ISSUE TYPE
COMPONENT NAME
I think it would make sense to put the value in the top level of the returned dict as
is_in_recovery
.ADDITIONAL INFORMATION
This feature would allow the user to determine whether postgres is running as a replica slave, or standalone/master, and be able to skip tasks when so. This is important as when running tasks which update the database, you can only make changes to a master, and the changes then get replicated to the slave(s).
Could also be used in a loop when waiting for a restored database to finish start up.
The text was updated successfully, but these errors were encountered: