Postgres replication lag spikes under heavy writes
We're seeing replication lag spike to 30-60 seconds during bulk insert operations on our primary. The setup is PG15 with streaming replication to two read replicas. WAL archiving is enabled, but lag seems correlated with checkpoint frequency. Has anyone found a good balance between checkpoint_segments and wal_level for this scenario?