*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 $ARCHIVEDIRexec "/usr/pgsql
I'll ajust the script and once is done will share here with u guys
Patrick
Patrick B wrote:
> This has been resolved.
How?
--
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http:/
This has been resolved.
cheers
On Sun, Jul 31, 2016 at 6:11 PM, Patrick B wrote:
>
> CHKPOINT=$(find $ARCHIVEDIR -type f -mtime +30 -name '00*' -printf '%f\n'
> | sort -r | head -1)
>
> /usr/pgsql-${PG_VERSION}/bin/pg_archivecleanup $ARCHIVEDIR $CHKPOINT
>
>
>
While I'm a bit suspect of this entire script/approach I believe t
Hi all,
I want to hold the wal_files for 30 days on my slaves.
For that reason, I created a script to do that:
*pg_archivecleaup_mv.bash:*
#!/bin/bash -eu
declare -r -x PATH='/usr/local/bin:/usr/bin:/bin';
# We just wanna delete the wal_files older than 30 days
ARCHIVEDIR='/var/lib/pgsql/9.