Old WAL files under pg_xlog not getting delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux