Script to delete WAL files periodically
9:39 AM#!/bin/bash ARCHIVEDIR='/var/lib/pgsql/pg_log_archive' CHKPOINT=$(find $ARCHIVEDIR -type f -mtime +11 -name '*backup' -printf '%f\n' | sort -r | head -1) cd $ARCHIVEDIR /usr/pgsql-9.4/bin/pg_archivecleanup $ARCHIVEDIR $CHKPOINT
0 comments