Thread: Setting wal_keep_segments parameter
Hello ,
I want to set wal_keep_segments parameter to a value but what should be the process I follow? I have archiving process on all clusters is on but when a sudden process comes to postgres wal files will be bigger than i assume. I don't know what I should do. Could you please help me?
Thanks.
rob stan <aslicokay@gmail.com> writes: > I want to set wal_keep_segments parameter to a value but what should be the > process I follow? I have archiving process on all clusters is on but when a > sudden process comes to postgres wal files will be bigger than i assume. I > don't know what I should do. Could you please help me? Well, the thing about wal_keep_segments is that there is no guaranteed safe value. If you are trying to use it to protect streaming standby servers then the better modern solution is to have the standbys use replication slots, so the primary actually knows how much old WAL they need. On the other hand, if you're just concerned about archiving then I don't think you need it at all; the archiving mechanism doesn't need any help to ensure that WAL doesn't get recycled before it's archived. Or in short: I think the correct setting for wal_keep_segments is zero. There are generally better ways to do what it does. regards, tom lane