Postgresql only writes a single WAL file at any point and it will be
the most recent file in the pg_xlog directory. Check the contents of
this directory and see if any gaps in filenames appear. You should
see an orderly progression in names that follow a hex pattern. If
you do see some old files that have gaps in the naming sequence,
those should be able to be safely removed. Also, if you've restarted
your database, the new wal_keep_segments setting should be active,
you can confirm in your database by entering "show
wal_keep_segments;" You can then safely remove any files provided
you still keep the last n files where n = the value
reported by the show command. FYI, checkpoint_timeout only instructs postgresql to write a checkpoint into the WAL file after this amount of time has elapsed, otherwise based on transaction volume, a checkpoint will be recorded every n WAL files provided the elapsed time has not eclipsed this setting. On 9/30/2015 5:29 PM, Roman Shubovich
wrote:
|