anchor.diff:      {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, CompactFilepath, NewFd, NewHeader),
  +            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
  
positive.code:         revs_limit = Header#db_header.revs_limit
          }.
  
  
  refresh_validate_doc_funs(Db) ->
      {ok, DesignDocs} = get_design_docs(Db),
  
negative.code:         ok = couch_file:write_header(Fd, ?HEADER_SIG, Header=#db_header{})
      end,
      NewDb = init_db(Name, CompactFile, Fd, Header),
      unlink(Fd),
      NewDb2 = copy_compact(Db, NewDb, Retry),
      
      gen_server:cast(Db#db.update_pid, {compact_done, CompactFile}),
      close_db(NewDb2).
      
  