Thread: Wal Files not removing automatically
Hello,
I have 3 nodes on which i have configured repmgr on 1st node primary, on 2nd standby and on 3rd witness. I have also configured pgbackrest on the primary and witness node.
I'm using fivetran as a replication slot. i have also set the parameters which are:
wal_level = 'logical'
synchronous_commit = local
wal_log_hints = 'on'
archive_mode = on
max_wal_senders = 10
wal_keep_segments = 32
max_replication_slots = 10
hot_standby = on
wal_sender_timeout = 300s
wal_receiver_timeout = 300s
max_connections = 1000
shared_buffers = 15GB
effective_cache_size = 45GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 3932kB
min_wal_size = 2GB
max_wal_size = 8GB
And these parameters also set on the other sites too. Now the issue is the wal files are removing automatically. And the restart_lsn is also not changing automatically. But when i drop the replication slot and recreate it. After i create the replication slot the restart_lsn change but after that i face the same issue that restart_lsn is not changing. So i wanna know is it kind of bug or it's a issue from from database side?
I have 3 nodes on which i have configured repmgr on 1st node primary, on 2nd standby and on 3rd witness. I have also configured pgbackrest on the primary and witness node.
I'm using fivetran as a replication slot. i have also set the parameters which are:
wal_level = 'logical'
synchronous_commit = local
wal_log_hints = 'on'
archive_mode = on
max_wal_senders = 10
wal_keep_segments = 32
max_replication_slots = 10
hot_standby = on
wal_sender_timeout = 300s
wal_receiver_timeout = 300s
max_connections = 1000
shared_buffers = 15GB
effective_cache_size = 45GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 3932kB
min_wal_size = 2GB
max_wal_size = 8GB
And these parameters also set on the other sites too. Now the issue is the wal files are removing automatically. And the restart_lsn is also not changing automatically. But when i drop the replication slot and recreate it. After i create the replication slot the restart_lsn change but after that i face the same issue that restart_lsn is not changing. So i wanna know is it kind of bug or it's a issue from from database side?
Devvrat Mittal <devvrat@tecorelabs.com> writes: > And these parameters also set on the other sites too. Now the issue is the > wal files are removing automatically. And the restart_lsn is also not > changing automatically. But when i drop the replication slot and recreate > it. After i create the replication slot the restart_lsn change but after > that i face the same issue that restart_lsn is not changing. So i wanna > know is it kind of bug or it's a issue from from database side? The entire point of a replication slot is that it prevents WAL from being discarded until whatever is supposed to read from the slot has consumed that WAL. So apparently nothing is reading from that slot, which means there is something wrong with the way you've connected up your replication setup. I would have thought you'd be using slots to feed your standby and witness servers (and I don't understand why you don't have two slots, one for each). regards, tom lane