--- /dev/null
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 52B92431FAF\r
+ for <notmuch@notmuchmail.org>; Fri, 11 Oct 2013 08:15:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id iO9aUefRIVrb for <notmuch@notmuchmail.org>;\r
+ Fri, 11 Oct 2013 08:15:48 -0700 (PDT)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 833BA431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 11 Oct 2013 08:15:48 -0700 (PDT)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1VUeRJ-0007N0-9d; Fri, 11 Oct 2013 12:15:41 -0300\r
+Received: (nullmailer pid 28207 invoked by uid 1000); Fri, 11 Oct 2013\r
+ 15:15:37 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, Ben Gamari <bgamari.foss@gmail.com>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/3] database: Add notmuch_database_compact_close\r
+In-Reply-To: <m2ob6xw4bw.fsf@guru.guru-group.fi>\r
+References: <1380745848-4972-1-git-send-email-bgamari.foss@gmail.com>\r
+ <1380745848-4972-2-git-send-email-bgamari.foss@gmail.com>\r
+ <m2ob6xw4bw.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 11 Oct 2013 12:15:37 -0300\r
+Message-ID: <878uxzq1nq.fsf@unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 11 Oct 2013 15:15:54 -0000\r
+\r
+Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+>\r
+> From functionality point if view this looks safe to me. \r
+> A followup patch could provide more information to the user\r
+> is any of the following attemts fail, e.g. \r
+>\r
+> - if removing old database out of the way how to remove the new\r
+> compacted database which can be considered as garbage now -- or\r
+> how to rename it (which is a bit dangerous due to potential races)\r
+>\r
+> - if moving compacted database fails how to restore backup database...\r
+> ... or how to move compacted database to where it was supposed to be\r
+> moved so that database is usable...\r
+>\r
+> ... if the database is missing is new created from scratch, also in case\r
+> there already is .notmuch directory ?\r
+>\r
+> ... should the database open try to open database from these alternative\r
+> names in case opening from original name fails ?\r
+>\r
+> another, small change:\r
+>\r
+> case "${xapian_version}" in\r
+> - 0.*|1.[01].*|1.2.[0-5])\r
+> + 0.*|1.[01].*|1.2.[0-5]|1.2.[0-5][^0-9]*)\r
+> printf "No (only available with Xapian > 1.2.6).\n" ;;\r
+>\r
+> someone might do version like 1.2.4-abc but probably not 1.2.04 (nor 1.2a.4)\r
+>\r
+> (side note: case $x in [^...]) works with bash (and ksh&zsh, but not with dash)\r
+\r
+OK, let's leave those merged, and clean up these issues before the next\r
+release.\r
+\r
+d\r