From e95fad8da449dbfc39bd931e5740bbbedcba639e Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Thu, 23 Jul 2026 11:05:46 -0400 Subject: [PATCH 1/2] fix(ansible): move pgBackRest spool-path off the 10GB root volume MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spool-path was never set explicitly, so pgBackRest defaulted to /var/spool/pgbackrest, which lands on the AMI's root volume (10GB, shared with the OS/systemd/journal) rather than the /data EBS volume PGDATA lives on. archive-get's async replica-catch-up queue can hold several 16MB+ WAL segments at once; once archive-async is enabled fleet-wide (INDATA-996) that risks filling the root volume and taking the instance down. Points spool-path at /data/pgbackrest_spool instead, and updates the directory-creation task to match. Global option, set once at provisioning — no supabase-admin-agent changes needed. --- ansible/files/pgbackrest_config/pgbackrest.conf | 2 ++ ansible/tasks/setup-pgbackrest.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/files/pgbackrest_config/pgbackrest.conf b/ansible/files/pgbackrest_config/pgbackrest.conf index f54336c4e8..ea136a8d3d 100644 --- a/ansible/files/pgbackrest_config/pgbackrest.conf +++ b/ansible/files/pgbackrest_config/pgbackrest.conf @@ -13,6 +13,8 @@ log-level-console = info log-level-file = detail log-subprocess = y resume = n +# Explicit vs. the /var/spool/pgbackrest default, which sits on the 10GB AMI root volume that archive-get's replica-catch-up queue (multi-segment WAL) could fill; /data is the dedicated EBS volume. +spool-path = /data/pgbackrest_spool start-fast = y # Note: the [supabase] stanza (pg1-path, pg1-socket-path, pg1-user) has been # removed from this file. supabase-admin-agent owns that stanza and writes it diff --git a/ansible/tasks/setup-pgbackrest.yml b/ansible/tasks/setup-pgbackrest.yml index 340fb7d963..d93bdcfc58 100644 --- a/ansible/tasks/setup-pgbackrest.yml +++ b/ansible/tasks/setup-pgbackrest.yml @@ -58,7 +58,7 @@ # (running as the pgbackrest user) cannot read conf files created by adminapi. - {dir: /etc/pgbackrest/conf.d, mode: '02770'} - {dir: /var/lib/pgbackrest} - - {dir: /var/spool/pgbackrest} + - {dir: /data/pgbackrest_spool} - {dir: /var/log/pgbackrest} loop_control: loop_var: backrest_dir From a2d5cc9f3a2bf81471e7d21483a45e573d3448c7 Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Thu, 23 Jul 2026 12:24:34 -0400 Subject: [PATCH 2/2] docs(ansible): note spool-path/dir-creation coupling in setup-pgbackrest.yml The pgbackrest spool directory path is now split across two files (pgbackrest.conf's spool-path and this task's dir-creation loop); add a why-comment so a future edit to one doesn't silently drift from the other. --- ansible/tasks/setup-pgbackrest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/tasks/setup-pgbackrest.yml b/ansible/tasks/setup-pgbackrest.yml index d93bdcfc58..d7c2c4558b 100644 --- a/ansible/tasks/setup-pgbackrest.yml +++ b/ansible/tasks/setup-pgbackrest.yml @@ -58,6 +58,7 @@ # (running as the pgbackrest user) cannot read conf files created by adminapi. - {dir: /etc/pgbackrest/conf.d, mode: '02770'} - {dir: /var/lib/pgbackrest} + # must match spool-path in ansible/files/pgbackrest_config/pgbackrest.conf - {dir: /data/pgbackrest_spool} - {dir: /var/log/pgbackrest} loop_control: