Julien ÉLIE julien at trigofacile.com
Wed Dec 23 18:38:14 UTC 2020

Hi Bo,

> At long last, ovsqlite!

The good news is that ovsqlite's integration to INN is ready.
I'm just waiting for your review of the following additions to 
documentation.  Do not hesitate to suggest more accurate wording.

Note that I've renamed the --with-sqlite3 configure flag to 
--with-sqlite out of consistency with our other configure flags, that do 
not mention a version.

Do you prefer Bo or /Bo (like in your signature) ?
Do you want your e-mail to be added in the HISTORY section of POD files?

--- doc/pod/news.pod	(révision 10457)
+++ doc/pod/news.pod	(copie de travail)
@@ -1,3 +1,21 @@
+=head1 Changes in 2.7.0
+=over 2
+=item *
+Bo Lindbergh has implemented a new overview storage method based on
+SQLite, known for its long-term stability and compatibility.  Fast and
+reliable, this new SQLite-based method is a perfect choice to store
+overview data.
+To select it as your overview method, set the I<ovmethod> parameter in
+F<inn.conf> to C<ovsqlite>.  Details about ovsqlite and how to switch to
+that new modern overview storage method can be found in the ovsqlite(5)
+and makehistory(8) man pages.
  =head1 Changes in 2.6.4

--- doc/pod/ovsqlite-server.pod	(révision 0)
+++ doc/pod/ovsqlite-server.pod	(copie de travail)
@@ -0,0 +1,74 @@
+The B<ovsqlite-server> daemon is the only program that opens the overview
+SQLite database.  It accepts connections from the other parts of INN that
+want to operate on overview data (B<innd>, B<nnrpd>, B<expireover>,
+This daemon must therefore be started before any other process can
+access the overview database.  B<ovsqlite-server> is normally invoked
+automatically by B<rc.news> when starting the news system.
+=head1 OPTIONS
+=over 4
+=item B<-d>
+B<ovsqlite-server> normally puts itself into the background, points
+its standard output and error to log files, and disassociates itself
+from the terminal.  Using B<-d> prevents all of this, resulting in log
+messages being written to the standard error output; this is generally
+useful only for debugging.
+=head1 HISTORY
+Initial implementation of ovsqlite written by Bo Lindbergh for 

--- doc/pod/ovsqlite.pod	(révision 0)
+++ doc/pod/ovsqlite.pod	(copie de travail)
@@ -0,0 +1,103 @@
+=head1 NAME
+ovsqlite - SQLite-based overview storage method for INN
+This method uses SQLite to store overview data.  It requires version
+3.8.2 or later of the SQLite library (3.20.0+ recommended).
+SQLite source, documentation, etc. are available at
+L<https://www.sqlite.org/>.  Ones of the stated goals of the SQLite
+file format are long-term stability and compatibility, which make that
+storage method particularly interesting to use.
+Only one protocol version of the ovsqlite storage method currently
+exists, implemented since S<INN 2.7.0>.
+=item I<compress>
+Enabling compression saves about S<70 %> of disk space on typical
+overview data.
+A transaction occurs every I<transrowlimit> articles or I<transtimelimit>
+seconds, whichever is smaller.  Inserting or deleting a database row
+within a transaction is very fast whereas committing a transaction is slow,
+especially on rotating storage.  Setting transaction limits too low
+leads to poor performance.  When rebuilding overview data, it may be
+worth temporarily raising these values, though.

--- doc/pod/rc.news.pod	(révision 10457)
+++ doc/pod/rc.news.pod	(copie de travail)
@@ -41,6 +41,11 @@

  =item *

+If I<ovmethod> is set to C<ovsqlite> in F<inn.conf>:  B<ovsqlite-server>
+is started and stopped.
+=item *
  If F<rc.news.local> exists in I<pathbin>:  B<rc.news.local> is run with
  argument C<start> or C<stop> (to perform site-specific startup or shutdown

--- doc/pod/install.pod	(révision 10457)
+++ doc/pod/install.pod	(copie de travail)
@@ -148,6 +148,7 @@
      --with-perl         Perl 5.004_03 or higher, 5.8.0+ recommended
      --with-python       Python 2.3.0 or higher, 2.5.0+ recommended (in 
the 2.x
series); Python 3.3.0 or higher (in the 3.x series)
      --with-bdb          Berkeley DB 4.4 or higher, 4.7+ recommended
+    --with-sqlite       SQLite 3.8.2 or higher, 3.20.0+ recommended
      --with-zlib         zlib 1.x or higher
      --with-openssl      OpenSSL 0.9.6 or higher
      --with-sasl         Cyrus SASL 2.x or higher
@@ -423,6 +424,22 @@
  built with S<Berkeley DB> support unless the B<--without-bdb> flag is
  explicitly passed to configure.

+=item B<--with-sqlite>=PATH
+Enables support for SQLite (3.8.2 or higher), which means that it
+will then be possible to use the ovsqlite overview method if you wish.
+Enabling this configure option doesn't mean you'll be required to use
+ovsqlite, but it does require that SQLite be installed on your system
+(including the header files, not just the runtime libraries).  If a
+path is given, it sets the installed directory of SQLite.  In case
+non-standard paths to the SQLite library is used, one or both of the
+options B<--with-sqlite-include> and B<--with-sqlite-lib> can be given
+to configure with a path.
+If the SQLite library is found at configure time, INN will be built
+with SQLite support unless the B<--without-sqlite> flag is explicitly
+passed to configure.
  =item B<--with-zlib>=PATH

  Enables support for compression for news reading, which means a
@@ -429,7 +446,8 @@
  compression layer can be negotiated between your server and newsreaders
  supporting that NNTP extension.

-Also enables support for compression with the ovdb storage method.
+Also enables support for compression with the ovdb and ovsqlite overview
+storage methods.

  This option requires that zlib be installed on your system (including the
  header files, not just the runtime libraries).  If a path is given, it

--- storage/ovsqlite/ovsqlite-server.c	(révision 0)
+++ storage/ovsqlite/ovsqlite-server.c	(copie de travail)
@@ -0,0 +1,2141 @@
+/*  $Id$
+**  Daemon server to access overview database based on SQLite.
+**  Original implementation written by Bo Lindbergh (2020-12-17).

--- storage/ovsqlite/ovsqlite.c	(révision 0)
+++ storage/ovsqlite/ovsqlite.c	(copie de travail)
@@ -0,0 +1,1108 @@
+/*  $Id$
+**  Overview storage method based on SQLite.
+**  Original implementation written by Bo Lindbergh (2020-12-17).

Julien ÉLIE

« C'est de ma faute à moi si les portes ne sont pas à la hauteur de mes
   menhirs ? » (Astérix)

More information about the inn-workers mailing list