<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello everyone,
<br>
<br>
I just have a quick question: I have a PostgreSQL master-slave
cluster set up using Pacemaker pretty much following this guide: <a
class="moz-txt-link-freetext"
href="http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster">http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster</a>
<br>
I ended up with a working cluster, we tested it, failover happened
just fine, slave became master etc. so we put it in production.
<br>
Now what I see is that the pg_archive directory keeps on growing. I
thought it was supposed to get cleaned after the slave received the
WAL files needed to be in sync with the master, but that didn't
happen.
<br>
I'm using the following archive command:
<br>
archive_command = 'cp %p <i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>var/lib/postgresql/9.3/main/pg_archive<span
class="moz-txt-tag">/</span></i>%f'
<br>
<br>
It feels weird to me, since I also saw some guides telling me to
using rsync here, or use cp, but then run a cron job to regurarly
rsync the contents of the directory to the slave node. Somehow I
can't figure out if rsync is really needed or not, to be honest I
can't truly figure out how exactly Postgres works in terms of
replication.
<br>
I also tried adding the following to my RA config:
<br>
archive_cleanup_command="/usr/lib/postgresql/9.3/bin/pg_archivecleanup
/var/lib/postgresql/9.3/main/pg_archive %r"
<br>
<br>
but it didn't change the fact that my archive directory seems to be
just growing and growing, and it has some files in it that were not
touched in a month or so.
<br>
<br>
I'm confused, so I'd really appreciate any help :).
<br>
<br>
Thank you,
<br>
Domi
</body>
</html>