Description
We have custom scripts which every 30 second checks if postgres available for RW operations and performs swichover if postgres cannot serve RW requests and disk is almost full. Patroni does not check if master available for RW operations and keeps master the same even though postgres cannot perform single insert.
So I wondering if patroni can check if postges is available for RW operations and hande some scenario (like full disk) or allow users to specify callbalck if some events occures.
In first option patroni can check if postgres available for RW operation, consider other parameters ( someone put postgres in recovery mode manually for backup or something like that) and perform switchover on healthy replica if possible.
In second option patroni can check if postgres availiable for RW operation and call callback with paramtetrs like connection to DB, occurrence count, state transition (RW>RO/RO>RW), uptime.
Activity