recovery.conf:
archive_cleanup_command = 'exec /var/lib/pgsql/bin/pg_archivecleaup_mv.bash'
Final pg_archivecleanup script:
#!/bin/bash declare -r -x PATH='/usr/local/bin:/usr/bin:/bin'; ARCHIVEDIR='/var/lib/pgsql/archive' LAST_BACKUP=$(ls -lto ${ARCHIVEDIR}) cd $ARCHIVEDIR exec "/usr/pgsql-9.2/bin/pg_archivecleanup" -d /var/lib/pgsql/archive ${LAST_BACKUP} | find $ARCHIVEDIR -type f -mmin +30 -delete
I'll ajust the script and once is done will share here with u guysPatrick
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных