From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.160]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q58EE1qO008800 for ; Fri, 8 Jun 2012 10:14:02 -0400 (EDT) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/avgusCdvwXOZ/NA7x/bvTm77PXdKS/DQ45g8QKZbYVzirAkURfg= X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de ([2001:6f8:13f0:31f:dd3e:153d:f334:7ef8]) by smtp.strato.de (jored mo12) (RZmta 29.10 AUTH) with (AES128-SHA encrypted) ESMTPA id N06a5bo58Dn6He for ; Fri, 8 Jun 2012 16:13:50 +0200 (CEST) Received: by britannica.bec.de (sSMTP sendmail emulation); Fri, 08 Jun 2012 16:13:39 +0200 Date: Fri, 8 Jun 2012 16:13:39 +0200 From: Joerg Sonnenberger To: tech@mdocml.bsd.lv Subject: Re: mandocdb tools, sqlite3, and ohash Message-ID: <20120608141339.GB21205@britannica.bec.de> Mail-Followup-To: tech@mdocml.bsd.lv References: <4FD0C58C.5040104@bsd.lv> <20120607180605.GA295@iris.usta.de> <4FD1D406.9020704@bsd.lv> <20120608122505.GA18779@britannica.bec.de> <4FD20047.1040108@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FD20047.1040108@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) On Fri, Jun 08, 2012 at 03:38:15PM +0200, Kristaps Dzonsons wrote: > On 06/08/12 14:25, Joerg Sonnenberger wrote: > >On Fri, Jun 08, 2012 at 12:29:26PM +0200, Kristaps Dzonsons wrote: > >>> 4. Function dbopen with real=0: > >>> There seems to be a race, open to symlink attacks, > >>> between remove(file) and sqlite3_open(file); > >>> some kind of O_EXCL or something might be required. > >> > >>Fixed---good point. Pity there's no O_TRUNC for sqlite3. > > > >SQLITE_OPEN_EXCLUSIVE. > > Yep, that's already in there. I'm going to research the COMMIT > blocks more: I don't want to "tune" the database much because I > worry about hitting memory barriers in having both the word > hashtable and a lot of database commits floating around in memory. > If you've any ideas, don't hesitate to share! Don't, it will flush pages to disk as soon as hits the cache size limit. Joerg -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv