Keep wal segments

From: Prince Pathria <prince(dot)pathria(at)goevive(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Keep wal segments
Date: 2018-09-21 07:18:48
Message-ID: CAON0Dax8eMK-yto4n3ZL70+1-51msRvKh3m+243GO1+=ihtbOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On postgresql10, I'm facing issue of "*requested WAL segment
000000010000007E0000003F has already been removed" *a lot. I resync slaves
with pg_basebackup and still some days after the same thing happens with
same or other replica node.

I have kept

wal_keep_segment = 1024
wal_buffers = 16MB
min_wal_size = 1GB
max_wal_size = 2GB
archive_mode = on
archive_command = cp %p /var/lib/pgsql/10/archive/%f
wal_level = replica
synchronous_commit = on
synchronous_standby_names = 'pgslave01'

Can I keep wal segments for some duration(eg 24 hours) ?

I'm using two replicas with one in sync and other in potential state.Is one
synchronous_standby_names fine?

Is there any option to remove archive wal after 30 days or 50GB?

And how archiving the wal logs help? The missing segment is "
*000000010000007E0000003F*" is in archive dir but how can I make it in use?

Thanks!!

Prince Pathria Systems Architect Evive +91 9478670472 goevive.com

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Flavio Henrique Araque Gurgel 2018-09-21 07:29:34 Re: Keep wal segments
Previous Message Andres Freund 2018-09-21 03:00:10 Re: Problems when initdb on AIX 5.3