0

I have found myself in a situation where the pg_xlog folder contains 80GB of data maybe because wrong configuration

how to purge or cleanup the files under pg_xlog?

/var/lib/pgsql/data/pg_xlog
[root@hadoop02 pg_xlog]# ls -ltr | more
total 53887180
-rw-------. 1 postgres postgres 16777216 Sep 19  2017 0000000100000000000000F1
-rw-------. 1 postgres postgres 16777216 Sep 19  2017 0000000100000000000000F2
-rw-------  1 postgres postgres 16777216 Sep 19  2017 0000000100000000000000F3
-rw-------  1 postgres postgres 16777216 Sep 19  2017 0000000100000000000000F4
-rw-------  1 postgres postgres 16777216 Sep 19  2017 0000000100000000000000F5
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000F6
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000F7
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000F8
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000F9
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000FA
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000FB
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000FC
-rw-------  1 postgres postgres 16777216 Sep 20  2017 0000000100000000000000FD
-rw-------  1 postgres postgres 16777216 Sep 21  2017 0000000100000000000000FE
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000000
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000001
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000002
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000003
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000004
-rw-------  1 postgres postgres 16777216 Sep 21  2017 000000010000000100000005
-rw-------  1 postgres postgres 16777216 Sep 22  2017 000000010000000100000006
-rw-------  1 postgres postgres 16777216 Sep 22  2017 000000010000000100000007
-rw-------  1 postgres postgres 16777216 Sep 22  2017 000000010000000100000008
-rw-------  1 postgres postgres 16777216 Sep 22  2017 000000010000000100000009
-rw-------  1 postgres postgres 16777216 Sep 22  2017 00000001000000010000000A
-rw-------  1 postgres postgres 16777216 Sep 22  2017 00000001000000010000000B
-rw-------  1 postgres postgres 16777216 Sep 23  2017 00000001000000010000000C
-rw-------  1 postgres postgres 16777216 Sep 23  2017 00000001000000010000000D
-rw-------  1 postgres postgres 16777216 Sep 23  2017 00000001000000010000000E
-rw-------  1 postgres postgres 16777216 Sep 23  2017 00000001000000010000000F
-rw-------  1 postgres postgres 16777216 Sep 23  2017 000000010000000100000010
-rw-------  1 postgres postgres 16777216 Sep 23  2017 000000010000000100000011
-rw-------  1 postgres postgres 16777216 Sep 23  2017 000000010000000100000012
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000013
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000014
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000015
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000016
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000017
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000018
-rw-------  1 postgres postgres 16777216 Sep 24  2017 000000010000000100000019
-rw-------  1 postgres postgres 16777216 Sep 24  2017 00000001000000010000001A
-rw-------  1 postgres postgres 16777216 Sep 24  2017 00000001000000010000001B
-rw-------  1 postgres postgres 16777216 Sep 25  2017 00000001000000010000001C
-rw-------  1 postgres postgres 16777216 Sep 25  2017 00000001000000010000001D
-rw-------  1 postgres postgres 16777216 Sep 25  2017 00000001000000010000001E
-rw-------  1 postgres postgres 16777216 Sep 25  2017 00000001000000010000001F
-rw-------  1 postgres postgres 16777216 Sep 25  2017 000000010000000100000020
-rw-------  1 postgres postgres 16777216 Sep 25  2017 000000010000000100000021
  • If you want remove all files rm /var/lib/pgsql/data/pg_xlog/* or find /var/lib/pgsql/data/pg_xlog -type f -exec rm {} \; – Arkadiusz Drabczyk Jun 10 '18 at 15:51
  • what ? you are really ? this are wall files! – yael Jun 10 '18 at 17:45
  • What are wall files? – Arkadiusz Drabczyk Jun 10 '18 at 18:08
  • Duplicate of dba.stackexchange.com/questions/166143/… – Josip Rodin Jun 10 '18 at 19:12
  • stop/start postgresql not help to clear the files on my server – yael Jun 10 '18 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.