From: | Andrew Crouch <andrew(dot)crouch(at)ericsson(dot)com> |
---|---|
To: | Chris Barnes <compuguruchrisbarnes(at)hotmail(dot)com>, Postgres General Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Archive command seem to be working. |
Date: | 2009-12-22 19:38:12 |
Message-ID: | 0180077C49A2B54E9BBA5D6E725A75CD0C9B8F713A@ESGSCCMS0003.eapac.ericsson.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Chris,
Assuming the error condition is resolved, the process should restart automatically. However, one issue we have found is that there appears to be an upper limit to how many files `test` can actually check for existence. We found that it was returning 1 in error and hence wasn't archiving the files. Replacing test with the perl equivalent seemed to sidestep this issue.
Your archive command would look something like:
perl -e 'exit 1 if -e "/data/pgsql/backups/wal_arch/%f.gz"' && cp %p /var/lib/pgsql/backups/wal_arch/%f
Don't forget to properly escape the quotes.
You should be able to update the archive command by reloading the configuration: '/sbin/service postgresql reload' or equivalent for your system.
After the configuration is loaded (and you aren't hitting any other system limitations) it should begin archiving the files again.
Cheers,
Andrew
________________________________
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Chris Barnes
Sent: terça-feira, 22 de dezembro de 2009 17:03
To: Postgres General Postgres General
Subject: [GENERAL] Archive command seem to be working.
Hi, hoping someone can tell me how to get this running again.
I have pitr running and noticed that the slave is far out of date with wal logs.
Upon investigation I see that on the master that /data/pgsql/backups/wal_logs has over 6000 logs that haven't been moved
to the /var/lib/pgsql/backups/wal_arch/ folder.
The root partition that has /var had been full and logs may have been removed, and it may have run some time in this condition until someone corrected it.
postgresql.conf file.
test ! -f /data/pgsql/backups/wal_arch/%f.gz && cp %p /var/lib/pgsql/backups/wal_arch/%f
Is there a way to restart a service without taking the database down/up?
Any help would be appreciated.
Cheers,
Chris Barnes
________________________________
Windows Live: Make it easier for your friends to see what you're up to on Facebook.<http://go.microsoft.com/?linkid=9691811>
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2009-12-22 20:03:06 | How to add month.year column validation |
Previous Message | Chris Barnes | 2009-12-22 19:03:27 | Archive command seem to be working. |