postgers的hot standby应该怎样配才能有效降低同步的延时?
目前的情况是,主从服务器不在一个机房,postgres的数据同步大约有一分钟的延时,但是在同样的机器上redis却能做到立即同步。
slot信息如图,下面是我的配置文件
# postgresql.conf
listen_addresses = '*'
max_connections = 100
shared_buffers = 128MB
dynamic_shared_memory_type = posix
wal_level = replica
max_wal_size = 1GB
min_wal_size = 80MB
max_wal_senders = 10
max_replication_slots = 10
hot_standby = on
wal_receiver_status_interval = 10s
hot_standby_feedback = on
wal_receiver_timeout = 60s
wal_retrieve_retry_interval = 5s
log_timezone = 'UTC'
datestyle = 'iso, mdy'
timezone = 'UTC'
lc_messages = 'en_US.utf8'
lc_monetary = 'en_US.utf8'
lc_numeric = 'en_US.utf8'
lc_time = 'en_US.utf8'
default_text_search_config = 'pg_catalog.english'
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.track = all