anchor.diff:          ?LOG_INFO("Compaction file still behind main file "
               "(update seq=~p. compact update seq=~p). Retrying.",
               [Db#db.update_seq, NewSeq]),
  -        couch_file:close(NewFd),
  +        close_db(NewDb),
           Pid = spawn_link(fun() -> start_copy_compact(Db) end),
           Db2 = Db#db{compactor_pid=Pid},
           {noreply, Db2}
  
positive.code:         ok = couch_file:write_header(Fd, ?HEADER_SIG, Header=#db_header{})
      end,
      NewDb = init_db(Name, CompactFile, Fd, Header),
      _NewDb2 = copy_compact(Db, NewDb, Retry),
      
      gen_server:cast(Db#db.update_pid, {compact_done, CompactFile}).
      
  
negative.code:     {ok, NewFd} = couch_file:open(CompactFilepath),
      {ok, NewHeader} = couch_file:read_header(NewFd, ?HEADER_SIG),
      #db{update_seq=NewSeq} = NewDb =
              init_db(Db#db.name, Filepath, NewFd, NewHeader),
      unlink(NewFd),
      case Db#db.update_seq == NewSeq of
      true ->
          % suck up all the local docs into memory and write them to the new db
  