summaryrefslogtreecommitdiff
path: root/docs/content/configuration/storage/postgres.md
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2025-02-23 19:22:26 +1100
committerGitHub <noreply@github.com>2025-02-23 08:22:26 +0000
commit2934c16dd0895789a75313ad661920c42e1b5169 (patch)
treeda1ac150acc1f3eb91edcf9282b899e687158fbe /docs/content/configuration/storage/postgres.md
parent0af038e0ced689db90da480876a0bb26d78c6fb9 (diff)
feat(storage): allow postgres failover (#7775)
This allows configuring failover PostgreSQL servers. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'docs/content/configuration/storage/postgres.md')
-rw-r--r--docs/content/configuration/storage/postgres.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/content/configuration/storage/postgres.md b/docs/content/configuration/storage/postgres.md
index 2e04f3aeb..78bdeda34 100644
--- a/docs/content/configuration/storage/postgres.md
+++ b/docs/content/configuration/storage/postgres.md
@@ -36,6 +36,7 @@ storage:
encryption_key: 'a_very_important_secret'
postgres:
address: 'tcp://127.0.0.1:5432'
+ servers: []
database: 'authelia'
schema: 'public'
username: 'authelia'
@@ -94,6 +95,35 @@ storage:
address: 'unix:///var/run/postgres.sock'
```
+### servers
+
+{{< confkey type="list(object)" required="no" >}}
+
+This specifies a list of additional fallback [PostgreSQL] instances to use should issues occur with the primary instance
+which is configured with the [address](#address) and [tls](#tls) options.
+
+Each server instance has the [address](#address) and [tls](#tls) option which both have the same requirements and
+effect, and have the same configuration syntax. This means all other settings including but not limited to
+[database](#database), [schema](#schema), [username](#username), and [password](#password); must be the same as the
+primary instance, and they must be fully replicated.
+
+Example configuration:
+
+```yaml
+storage:
+ postgres:
+ address: 'tcp://postgres1:5432'
+ tls:
+ server_name: 'postgres1.local'
+ servers:
+ - address: 'tcp://postgres2:5432'
+ tls:
+ server_name: 'postgres2.local'
+ - address: 'tcp://postgres3:5432'
+ tls:
+ server_name: 'postgres3.local'
+```
+
### database
{{< confkey type="string" required="yes" >}}