Skip to content

praefect: Add database read/write check

John Cai requested to merge jc-postgres-readwrite-check into master

There are different conditions that cause a database to be not writeable. For instance, if a database is failing over and postgres puts it in pg_is_in_recovery it becomes read only. It's difficult to detect each of these scenarios, but we can do a basic read/write check before starting up praefect.

In order to check if praefect can read/write to a database, we can use the hello_world table. We can try inserting a row, and reading from it.

closes: gitlab#328493 (closed)

Edited by John Cai

Merge request reports