Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.10.1
-
Fix Version/s: None
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Affected Branches:MOODLE_310_STABLE
Description
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.
Attachments
Issue Links
- links to