Permalink
Browse files

Do not attempt to enqueue the wal segments archived during flush, cau…

…se there is no wal segment there.
  • Loading branch information...
1 parent cbbd667 commit d1dc6ec4fb7bcbf8e281de2a0a876308479b33ca @alexeyklyukin alexeyklyukin committed May 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 cmd_archiver
View
@@ -325,6 +325,10 @@ def archive_func():
print "NOTICE: Using: " + rsync_transfer
retval = system("%s" % (rsync_transfer))
if retval:
+ if flush:
+ # don't try to enqueue the segment archived if this is a flush
+ print "FATAL: unable to flush pg_xlog to host %s" % (str(host),)
+ raise ArchiveFailure
print "NOTICE: no luck shipping archive"
queue_dir = l_archivedir + "/" + str(host)
queue_transfer = """%s %s %s""" % (str(rsync_bin), str(archivefile), str(queue_dir))

0 comments on commit d1dc6ec

Please sign in to comment.