On 2/2/14, 9:26 AM, CS DBA wrote:
On 2/2/14, 9:19 AM, Raghavendra wrote:
we want to copy the file to /data/wal_tmp, then do a mv to /data/wal so our process that ships a copy to the standby servers never see's a partial file (since it watches /data/wal)
So, I found that the archive command has a typeo (using a &f instead of a %f at the end):
cp %p /data/wal_tmp/%f && mv /data/wal_tmp/%f /data/wal/
&f
I don't see any way to make the command as is "work" so I suspect the only option is a restart.
Question: as a growing stack of archive commands fails (see log entry example below), is it going to take an increasingly longer and longer time to do a restart?
Log entry:
sh: f: command not found
11631 2014-02-02 09:49:41 MST [2014-02-02 01:04:54 MST] [3820] LOG: archive command failed with exit code 127
11631 2014-02-02 09:49:41 MST [2014-02-02 01:04:54 MST] [3821] DETAIL: The failed archive command was: test ! -f /data/wal/00000001000006E50000001C && cp pg_xlog/00000001000006E50000001C /data/wal_tmp/00000001000006E50000001C && mv /data/wal_tmp/00000001000006E50000001C /data/wal/&f
11631 2014-02-02 09:49:41 MST [2014-02-02 01:04:54 MST] [3822] WARNING: transaction log file "00000001000006E50000001C" could not be archived: too many failures