-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
3.10.1
-
None
-
MOODLE_310_STABLE
Since version 10, PostgreSQL allows to specify serveral hosts in the
connnection string, and can, if the connection option
target_session_atts=read-write is added, automatically choose the primary
(writable) node in a cluster. If the primary changes (due to a failover or
switchover), the client connection will be retried for the next host until a
writable primary is found again.
To leverage this, add the "dbfailover" option to dboptions. If it is set, add
"target_session_attr=read-write" to the connection string. This, in conjunction
with specifying several hosts in $CFG->dbhost config variable makes it possible
to point Moodle at a high-available PostgreSQL cluster and let it follow
failovers automatically.
- links to