Commit Graph

48 Commits

Author SHA1 Message Date
Slavi Pantaleev 534631c1e7 Document Synapse database restore pitfalls per the official backup guide
Add the two remaining hints from the official Synapse backup guide:

- never import a dump into a database that already has tables present
  (at best it errors, at worst it causes subtle inconsistencies)
- when restoring a backup older than the server's current state,
  truncate e2e_one_time_keys_json before starting Synapse, so used
  one-time keys are not re-issued (which causes decryption errors);
  our pg_dumpall-based backup commands include that table

Fixes #4004

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 14:34:45 +03:00
Slavi Pantaleev b71968cf64 Fix variable name (postgres_postgres_process_extra_arguments_auto -> postgres_postgres_process_extra_arguments_default) in documentation about Postgres tuning
Lock Threads / action (push) Has been cancelled
Matrix CI / yamllint (push) Has been cancelled
Matrix CI / ansible-lint (push) Has been cancelled
Matrix CI / Run pre-commit (push) Has been cancelled
Things have changed after https://github.com/mother-of-all-self-hosting/ansible-role-postgres/commit/b906c3036bfa866436601b8556a7d38e45a99e36
2025-09-25 17:22:04 +03:00
Aine 60aa88992a add a note about postgres upgrade 2025-03-18 11:49:08 +02:00
Suguru Hirahara c385bee7af Re-run "reuse annotate" to sort statements
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-05 12:43:41 +09:00
Suguru Hirahara f57ee8d3e0 Update docs/maintenance-postgres.md: copy from the MASH playbook
Copied from https://github.com/mother-of-all-self-hosting/mash-playbook/blob/802032cda74e0d0088ebb198a87165ce2e71ebbc/docs/services/postgres.md

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-25 23:06:47 +09:00
Suguru Hirahara 90540c244f Update docs/maintenance-postgres.md: add a copyright header
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-24 17:03:54 +09:00
Suguru Hirahara c27fb2a832 Fix capitalization: postgres → Postgres
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-13 14:00:41 +09:00
Suguru Hirahara ea18d9d87e Remove blank lines around lists titled with "Table of contents"
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-10 23:51:50 +09:00
Suguru Hirahara 39cd32aa26 Update docs/maintenance-postgres.md: add the warning styling
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-02-10 23:51:42 +09:00
Suguru Hirahara a4f9bdebcd Update docs: adopt the common instruction
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-16 13:09:06 +09:00
Suguru Hirahara a31400ed4a Adjust blank lines: add ones
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-02 03:14:48 +09:00
Suguru Hirahara dd5881f2b8 Adjust blank lines: remove duplicated ones
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-02 03:14:39 +09:00
Suguru Hirahara cd1905f576 Update triple backticks with syntax highlighting (#3832)
* Triple backticks with syntax highlighting: yml → yaml

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Triple backticks with syntax highlighting: yaml and sh

The strings "yml" were replaced with "yaml" as the latter is used more than the former.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Triple backticks with syntax highlighting: INI

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/configuring-playbook-jitsi.md: remove redundant white space characters after triple backticks

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

---------

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-11-28 11:33:56 +02:00
Suguru Hirahara 6995f3990e Edit line breaks in sentences and paragraphs
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-23 01:13:23 +09:00
Slavi Pantaleev ec5e379672 Update old references to com.devture.ansible.role.postgres & com.devture.ansible.role.traefik
Provoked by https://github.com/mother-of-all-self-hosting/mash-playbook/pull/280
2024-10-07 08:46:33 +03:00
Slavi Pantaleev 8445843562 Switch postgres/postgres-backup Ansible role sources and adjust variable names (devture_postgres_ -> postgres_) 2024-09-27 09:37:24 +03:00
Kim Brose 3a0cb01d6c Fix docs typo 2024-06-11 19:25:28 +02:00
Marty a6f0d643ed Update maintenance-postgres.md
Seems that borg backup support was added by the commit b61b908c2e
2024-05-05 08:53:18 +02:00
Slavi Pantaleev 29b62f77a5 Upgrade Postgres (v16.0-5 -> v16.0-6) - adds auto-tuning 2023-10-18 08:24:52 +03:00
throny 7e54417fca Update maintenance-postgres.md
no postgres 16 support with borg, 15 works.
2023-10-11 11:26:42 +02:00
Slavi Pantaleev 8c4234d52a Add note about ANALYZE after Postgres database importing 2023-09-26 17:52:01 +03:00
Slavi Pantaleev 2b49ae79ca Use just for Postgres maintenance command examples 2023-03-16 11:23:22 +02:00
Slavi Pantaleev 9ab2a72e86 More matrix_postgres -> devture_postgres changes
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2319
2022-12-06 10:12:31 +02:00
Slavi Pantaleev 7b43ef34b7 Remove more hardcoded matrix-postgres references 2022-11-27 09:16:18 +02:00
Slavi Pantaleev 40e8ef0c70 Do not tell people to use latest Borgmatic - it won't help with Postgres v15
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2259#issuecomment-1312737960
2022-11-16 11:50:05 +02:00
throny f5a09f30b7 Update maintenance-postgres.md 2022-11-12 23:48:57 +01:00
throny b12cdbd99d Update maintenance-postgres.md 2022-11-12 23:40:46 +01:00
throny adbc09f152 warn users about upgrading to pg15 when using borg 2022-11-12 11:20:43 +01:00
Wobbel The Bear 1b41e9c7dd Update PostgreSQL Maintenance page
Added a mid-sized VPS configuration with configuration changes to the PostgreSQL database config.

Deleted single quotes in one of the examples to unify the examples
2021-05-26 13:50:35 +02:00
Slavi Pantaleev 719ecb03a8 Add note about pgtune.leopard.in.ua 2021-05-26 09:55:40 +03:00
Slavi Pantaleev 37c089bb96 Minor docs improvements 2021-04-05 11:13:45 +03:00
Aaron Raimist c86cc11386 Add some advice about tuning PostgreSQL 2021-04-02 19:26:41 -05:00
Slavi Pantaleev ca22355910 Update backup docs a bit 2021-02-22 08:36:42 +02:00
Marc Leuser 53869ac14a recommend a better way of backing up postgres
don't spawn an extra container
run pg_dumpall within matrix-postgres instead, ensures correct version
store under /matrix so a backup of the folder will contain a DB dump
use absolute paths just in case something in the ENV is messed up
2021-02-21 21:38:20 +01:00
Slavi Pantaleev d3aea8f4b8 Update Postgres backup docs for ARM32 2021-01-22 14:04:36 +02:00
Slavi Pantaleev 95346f3117 Reorganize Postgres access (breaking change)
In short, this makes Synapse a 2nd class citizen,
preparing for a future where it's just one-of-many homeserver software
options.

We also no longer have a default Postgres superuser password,
which improves security.

The changelog explains more as to why this was done
and how to proceed from here.
2021-01-22 13:26:12 +02:00
Slavi Pantaleev d7dba0a2ff Update some Docker image references 2021-01-08 16:37:39 +02:00
Slavi Pantaleev 0a977ce113 Fix incorrect path in docs 2021-01-05 22:59:35 +02:00
Hardy Erlinger ee8dd44837 Use up-to-date PostgreSQL container version for backups. 2020-10-02 22:53:06 +02:00
Slavi Pantaleev e3dca2f66f Try to avoid Docker logs growing too much for one-off containers
We recently had a report of the Postgres backup container's log file
growing the size of /var/lib/docker until it ran out of disk space.

Trying to prevent similar problems in the future.
2020-09-01 09:03:48 +03:00
Slavi Pantaleev daf13107a0 Add support for rust-synapse-compress-state 2020-08-21 13:53:39 +03:00
Aaron Raimist 65963f694a Use Postgres 12.1 when creating a backup 2020-01-20 16:33:47 -06:00
Slavi Pantaleev e32aaacaa7 Make gzipped SQL dumps by default during --upgrade-postgres 2019-10-05 11:42:08 +03:00
Slavi Pantaleev 29526e7bb1 Add support for backing up / importing all Postgres databases/users 2019-10-05 11:42:08 +03:00
Slavi Pantaleev 9c438a3870 Add support for Postgres v12 2019-10-04 08:51:36 +03:00
Slavi Pantaleev 76862f4f2a Suggest running start tag after janitor and Postgres vacuum
We do restart Synapse explicitly, but some other services
(bridges, matrix-corporal, ..) may not restart sometimes.

It's best to restart all services explicitly.
2019-07-08 11:09:23 +03:00
Slavi Pantaleev 0ca21d80d7 Add Synapse Maintenance docs and synapse-janitor integration 2019-07-08 09:38:36 +03:00
Slavi Pantaleev 70b2f07fec Add PostgreSQL backup information 2019-02-09 14:36:47 +02:00