Optimize streaming replication because of network latency

From: Mai Peng <maily(dot)peng(at)webedia-group(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Optimize streaming replication because of network latency
Date: 2020-12-10 17:41:21
Message-ID: 99AA0D0E-E266-48AF-AB29-4E2B73CBE3EA@webedia-group.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

We’ve added a streaming standby on a gcp container. There’s a lot of network latency between our primary in EU and this standby in South America.
I did a big update on a table ( 4 millions rows) and it generates a lot of lag : more than 5 hours.
The standby has great hardware ressources: cpu, ssd disk and had no load during this update.
How could we handle this lag and have less impact, less lag ?
Basic PG Config:
shared_buffers = 8GB
work_mem = 128MB
max_connections = 600
wal_keep_segments = 1000
wal_sender_timeout = 0
replication_timeout=(not set)
wal_receiver_status_interval=10s
max_wal_senders=20
Checkpoint_timeout = 10min
Max_wal_size= 2GB
min_wal_size= 1GB

Thank you
Mai

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2020-12-10 18:00:27 Re: Optimize streaming replication because of network latency
Previous Message Ron 2020-12-10 17:09:57 Re: psql (13.1 (Debian 13.1-1.pgdg100+1), server 12.5 (Debian 12.5-1.pgdg100+1))