From: | rammohan ganapavarapu <rammohanganap(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Old WAL files under pg_xlog not getting delete |
Date: | 2019-01-30 22:58:02 |
Message-ID: | CALm_Vjjjti+z6m+svMGfoeiLhyjnNxCksT4RucSWVr7G=rKAmQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I am trying to understand why postgresql not removing WAL logs under
pg_xlog in 9.6, below are my settings
max_wal_size= 1GB
wal_keep_segments=500
pg_xlog/|wc -l
506
pg_xlog]# du -sh .
7.9G .
and i have files from last year Nov
ls -ltr |head
total 8257540
-rw------- 1 postgres postgres 16777216 Nov 21 16:32
0000000100000003000000BD
-rw------- 1 postgres postgres 16777216 Nov 21 16:32
0000000100000001000000C6
-rw------- 1 postgres postgres 16777216 Nov 21 16:33
0000000100000001000000C7
-rw------- 1 postgres postgres 16777216 Nov 21 16:33
0000000100000001000000C8
-rw------- 1 postgres postgres 16777216 Nov 21 16:34
0000000100000001000000C9
-rw------- 1 postgres postgres 16777216 Nov 21 16:34
0000000100000001000000CA
-rw------- 1 postgres postgres 16777216 Nov 21 16:35
0000000100000001000000CB
-rw------- 1 postgres postgres 16777216 Nov 21 16:35
0000000100000001000000CC
-rw------- 1 postgres postgres 16777216 Nov 21 16:36
0000000100000001000000CD
Here is my controldata output
pg_control version number: 960
Catalog version number: 201608131
Database system identifier: 6620833305040850458
Database cluster state: in production
pg_control last modified: Wed 30 Jan 2019 05:49:44 PM EST
Latest checkpoint location: 3/BC000098
Prior checkpoint location: 3/BA000220
Latest checkpoint's REDO location: 3/BC000060
Latest checkpoint's REDO WAL file: 0000000100000003000000BC
and i dont see postgresql using any of the other files.
sudo lsof |grep pg_xlog
bash 28969 root cwd DIR 202,112
32768 4063264 /opt/pgdata/pg_xlog
postgres 29571 postgres 3u REG 202,112
16777216 4068479 /opt/pgdata/pg_xlog/0000000100000003000000BC
postgres 29573 postgres 3u REG 202,112
16777216 4068479 /opt/pgdata/pg_xlog/0000000100000003000000BC
Any idea why those old files are not getting removed? How can i recycle
them?
Thanks,
Ram
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2019-01-30 23:10:13 | Re: Old WAL files under pg_xlog not getting delete |
Previous Message | Tom Lane | 2019-01-30 14:46:49 | Re: pgstattupple vs pg_total_relation_size |