makehistory docs say it doesn't make dbz files, but they appear nonetheless

Julien ÉLIE julien at trigofacile.com
Sat Feb 21 13:45:37 UTC 2009


Hi,

Can we assume that the dbz indexes for the history file are rebuilt
by both makehistory and makedbz?  And that it is useful to run
makedbz after makehistory in order to improve the efficiency of
the dbz indexes (better size)?
Or is there something I am missing?


> From <http://bugs.debian.org/511101>:
>
>> The makehistory man page says:
>>
>>   Note that the dbz(3) indexes for the history file are rebuilt by
>>   makedbz(8), not by makehistory as in earlier versions of INN.
>>
>> However after running deleting history* and running
>> sudo su - news -c '/usr/lib/news/bin/makehistory -OeF -s300000'
>> I see:
>>
>> -rw-r--r-- 1 news news 2169453 2009-01-07 13:46 history
>> -rw-r--r-- 1 news news      45 2009-01-07 13:46 history.dir
>> -rw-r--r-- 1 news news 2700000 2009-01-07 13:46 history.hash
>> -rw-r--r-- 1 news news 3600000 2009-01-07 13:46 history.index
>
>
> It is true that makehistory does that.
> However, I could not find where it calls makedbz :-/
> Is the creation of .dir/.hash/.index/.pag files automatic when overview
> or history functions are called?
>
> That paragraph about makedbz/makehistory was added in the changelog
> between INN 2.2 and 2.3.  Has it been reverted since that time?


The dbz index is created by HISctl (makehistory.c) > hisv6_ctl > hisv6_reopen
(hisv6/hisv6.c) > dbzfresh (dbz.c) whose comment is:

/* dbzfresh - set up a new database, no historical info
 * Return true for success, false for failure
 * name - base name; .dir and .pag must exist
 * size - table size (0 means default)
 */


I see that piece of code present in INN 2.4+, which was not in INN 2.3:

 History = HISopen(NULL, innconf->hismethod, flags);
 HISctl(History, HISCTLS_NPAIRS, &npairs);
 if (!HISctl(History, HISCTLS_PATH, HistoryPath))
            sysdie("cannot open %s", HistoryPath);
    }

It appears it was added with the "-s" flag for makehistory.  Therefore,
there is always a call to dbz when running makehistory and the dbz indexes
are built.  Is it right?

-- 
Julien ÉLIE

« Il ne faut jamais pleurer d'avoir perdu la lune
  car les larmes empêchent de voir les étoiles. »




More information about the inn-workers mailing list