We are running postgresql on centos7 psql (PostgreSQL) 9.6.18
in the conf file wal_keep_segments was commented out which should revert to the default setting of 0, also max_wal_size was set to 2GB. The pg_xlog dir has 7000+ wal files and the size of the dir is 112GB. Some of the wal files date back to 2017.
to test to see if the default for wal_keep_segments was not working correctly we set it to 200, yet the number of wal files continues to increase
I dont understand why these settings arent working, is there a way that these limits are overruled by other settings?