Re: Archive command seem to be working. - Mailing list pgsql-general

From Chris Barnes
Subject Re: Archive command seem to be working.
Date
Msg-id BLU149-W47A7CB088300A1F94B8DFAD4800@phx.gbl
Whole thread Raw
In response to Re: Archive command seem to be working.  (Andrew Crouch <andrew.crouch@ericsson.com>)
List pgsql-general
 
 
Thanks Andrew, I was on vacation and the /var/lib of root did fill up. The on call person was notified and the fix was to copy all of the logs back into /data/pgsql/backup/wal_arch.
 
Some 6500 files and the copy failed because it couldn't transverse the directory without an error. I moved the files from the server to backup and it started syncing right away.
 
I will take the perl copy into account. Thank you for the change and response.
 
Chris :)
 
From: andrew.crouch@ericsson.com
To: compuguruchrisbarnes@hotmail.com; pgsql-general@postgresql.org
Date: Wed, 23 Dec 2009 03:38:12 +0800
Subject: Re: [GENERAL] Archive command seem to be working.


.ExternalClass .ecxhmmessage P {padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;} .ExternalClass BODY.ecxhmmessage {font-size:10pt;font-family:Verdana;}
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@postgresql.org [mailto:pgsql-general-owner@postgresql.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.

Get Windows 7 for only $39.99—CDN College or University students only. This offer ends Jan 3—upgrade now!

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: reindex
Next
From: Pau Marc Munoz Torres
Date:
Subject: Re: Drop/ Alter index if exist