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
Add check_replication_slots check to check the delay on any replication slots. #109
Conversation
…on slots. "Delay" is measured as size of transaction logs retained for the slot e.g: check_postgres_replication_slots -db=TEST -H=192.168.0.106 -warning=32M -critical=64M
Hi, thanks for the pull request! Some comments:
t/02_replication_slots.t:
|
…ctivity and cleanup whitespace and stray tabs.
…ly supplied by Cristoph Berg.
Thanks very much Christoph! Looks like I never tested it on a physical replication slot that hadn't been "started up" yet with START_REPLICATION. This should be resolved now, as well as the sloppy whitespace. I've added some test cases to the file you supplied, with most of the tests done on logical slots because of the requirement for physical slots to be started up, but the tests on the physical slots would be the same anyway so I'm not sure it's required. If we needed to I guess we could start the physical slots up with psql over the replication protocol; that'd require a way to add the relevent entries in pg_hba.conf for the test_database and I couldn't see an existing way to do that ... and I didn't want to roll my own if there was a way to do it already? |
Thanks for the update, just pushed as a3ea525. Physical slots were just what I was trying first, from skimming over your testcases the code looks very much good enough. |
"Delay" is measured as size of transaction logs retained for the slot e.g:
check_postgres_replication_slots -db=TEST -H=192.168.0.106 -warning=32M -critical=64M