From: | John Scalia <jayknowsunix(at)gmail(dot)com> |
---|---|
To: | rammohan ganapavarapu <rammohanganap(at)gmail(dot)com> |
Cc: | Ron <ronljohnsonjr(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Old WAL files under pg_xlog not getting delete |
Date: | 2019-01-31 16:37:19 |
Message-ID: | AF7ED4E4-C8FC-4BD5-A1E4-B0BA456E304B@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Ram,
Remember that keep_wal_segments is a minimum setting, not a maximum one. It’s telling the database to maintain at least that many segments. Plus, check how you’ve set the archive_command. If that’s not correct, nothing will remove the WAL files.
—
Jay
Sent from my iPhone
> On Jan 31, 2019, at 11:22 AM, rammohan ganapavarapu <rammohanganap(at)gmail(dot)com> wrote:
>
> Ron,
>
> I have changed the wal_keep_segments=100 and restarted the postgresql processes but i still see 500+ files under pg_xlog, i had to run checkpoint manually to clean.
>
> Ram
>
>> On Wed, Jan 30, 2019 at 7:19 PM Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
>>> On 1/30/19 9:09 PM, rammohan ganapavarapu wrote:
>>> Thank you all, but irrespective of count i have why is it keeping old files?
>>
>> Because you're telling it to!!
>>
>> max_wal_size= 1GB
>> wal_keep_segments=500
>>
>>> and how is it using those files? Is there any processes that can flush or remove those files?
>>
>> Change the parameter and restart the server...
>>
>>>
>>>> On Wed, Jan 30, 2019, 4:11 PM David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com wrote:
>>>> On Wed, Jan 30, 2019 at 5:00 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>>>> > Hmm ... I would recommend to keep the xlog files in a subdir, not the
>>>> > root of the filesystem.
>>>>
>>>> They are in a subdir (under /opt/pgdata), and the OP seems likely to
>>>> have omitted the self/parent hidden directories during his check as
>>>> well. Plus per the docs we actually expect 501 so there isn't a need
>>>> to account for 6 extra, just 5.
>>>>
>>>> Dave
>>>>
>>
>> --
>> Angular momentum makes the world go 'round.
From | Date | Subject | |
---|---|---|---|
Next Message | Jorge Torralba | 2019-01-31 16:52:00 | Partition detach / index question |
Previous Message | rammohan ganapavarapu | 2019-01-31 16:22:12 | Re: Old WAL files under pg_xlog not getting delete |