mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-20 23:16:49 +00:00
Fix VPS replica clusters: match home's max_connections (recovery abort)
Postgres refuses to replay WAL past a checkpoint recorded with higher max_connections/max_wal_senders/etc than the recovering instance's own settings: 'recovery aborted because of insufficient parameter settings: max_connections = 100 is a lower setting than on the primary server, where its value was 200' - confirmed live on all 3 VPS clusters (they had no postgresql.parameters block at all, defaulting to CNPG's 100). Copied home's full postgresql.parameters block to remove any other potential mismatch (max_wal_senders, max_worker_processes are subject to the same check). Bumped memory requests/limits to match home too - shared_buffers: 512MB needs headroom the previous 256Mi/1Gi didn't have.
This commit is contained in:
@@ -31,18 +31,41 @@ spec:
|
|||||||
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|
||||||
|
# shared_buffers: 512MB above needs headroom - matches home's requests/limits.
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
memory: "512Mi"
|
||||||
cpu: "25m"
|
cpu: "25m"
|
||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "2Gi"
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
|
||||||
|
# Must match (or exceed) home's max_connections/max_wal_senders/etc -
|
||||||
|
# Postgres refuses to replay WAL past a checkpoint recorded with higher
|
||||||
|
# values than the recovering instance's own settings ("recovery aborted
|
||||||
|
# because of insufficient parameter settings: max_connections = 100 is
|
||||||
|
# a lower setting than on the primary server, where its value was 200",
|
||||||
|
# confirmed live 2026-08-18). Copied from
|
||||||
|
# infrastructure/authentik/manifests/cnpg-cluster.yaml.
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
max_connections: "200"
|
||||||
|
shared_buffers: "512MB"
|
||||||
|
effective_cache_size: "1536MB"
|
||||||
|
maintenance_work_mem: "128MB"
|
||||||
|
checkpoint_completion_target: "0.9"
|
||||||
|
wal_buffers: "16MB"
|
||||||
|
default_statistics_target: "100"
|
||||||
|
random_page_cost: "1.1"
|
||||||
|
effective_io_concurrency: "200"
|
||||||
|
work_mem: "2621kB"
|
||||||
|
min_wal_size: "1GB"
|
||||||
|
max_wal_size: "4GB"
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
recovery:
|
recovery:
|
||||||
source: home-backup
|
source: home-backup
|
||||||
|
|||||||
@@ -20,18 +20,36 @@ spec:
|
|||||||
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|
||||||
|
# shared_buffers: 512MB above needs headroom - matches home's requests/limits.
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
memory: "512Mi"
|
||||||
cpu: "25m"
|
cpu: "25m"
|
||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "2Gi"
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
|
||||||
|
# See infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml
|
||||||
|
# for why this must match home's settings (recovery aborts otherwise).
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
max_connections: "200"
|
||||||
|
shared_buffers: "512MB"
|
||||||
|
effective_cache_size: "1536MB"
|
||||||
|
maintenance_work_mem: "128MB"
|
||||||
|
checkpoint_completion_target: "0.9"
|
||||||
|
wal_buffers: "16MB"
|
||||||
|
default_statistics_target: "100"
|
||||||
|
random_page_cost: "1.1"
|
||||||
|
effective_io_concurrency: "200"
|
||||||
|
work_mem: "2621kB"
|
||||||
|
min_wal_size: "1GB"
|
||||||
|
max_wal_size: "4GB"
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
recovery:
|
recovery:
|
||||||
source: home-backup
|
source: home-backup
|
||||||
|
|||||||
@@ -19,18 +19,36 @@ spec:
|
|||||||
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|
||||||
|
# shared_buffers: 512MB above needs headroom - matches home's requests/limits.
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
memory: "512Mi"
|
||||||
cpu: "25m"
|
cpu: "25m"
|
||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "2Gi"
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
size: 20Gi
|
size: 20Gi
|
||||||
storageClass: local-path
|
storageClass: local-path
|
||||||
|
|
||||||
|
# See infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml
|
||||||
|
# for why this must match home's settings (recovery aborts otherwise).
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
max_connections: "200"
|
||||||
|
shared_buffers: "512MB"
|
||||||
|
effective_cache_size: "1536MB"
|
||||||
|
maintenance_work_mem: "128MB"
|
||||||
|
checkpoint_completion_target: "0.9"
|
||||||
|
wal_buffers: "16MB"
|
||||||
|
default_statistics_target: "100"
|
||||||
|
random_page_cost: "1.1"
|
||||||
|
effective_io_concurrency: "200"
|
||||||
|
work_mem: "2621kB"
|
||||||
|
min_wal_size: "1GB"
|
||||||
|
max_wal_size: "4GB"
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
recovery:
|
recovery:
|
||||||
source: home-backup
|
source: home-backup
|
||||||
|
|||||||
Reference in New Issue
Block a user