Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFW86-0005N4-Rf for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2014 21:53:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WFW86-0004wm-C4 for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2014 21:53:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFW85-0004wg-OE for pgsql-bugs@postgresql.org; Mon, 17 Feb 2014 21:53:33 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WFW82-0006Ln-VS for pgsql-bugs@postgresql.org; Mon, 17 Feb 2014 21:53:33 +0000 Received: from anarazel.de (p54AF43C3.dip0.t-ipconnect.de [84.175.67.195]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0MVcwZ-1WnT3V03h9-00YyXL; Mon, 17 Feb 2014 22:53:30 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 48013100C81; Mon, 17 Feb 2014 22:53:29 +0100 (CET) Date: Mon, 17 Feb 2014 22:53:29 +0100 From: Andres Freund To: Jeff Janes Cc: Clemens Eisserer , Pg Bugs Subject: Re: BUG #9161: wal_writer_delay is limited to 10s Message-ID: <20140217215329.GH7161@awork2.anarazel.de> References: <20140214225026.GB11943@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:dj87EpgUb9duEOL7keikIy0rAbGRHMYThDOmp+TGFt1 Vb/qV4vf3NiL9oKlKWtOvw7AuW9PpDZFyArnTNzSOnwy4ya7Et jVZ8p0ehAUB6ABr9CFNK6phIqX64v5lMtll1wqhUjw/Y+Oa/o7 7du924nFDghpwAi6lHigzpoArfPjjGOi3jKzzre9rldgqS0csC POL9rsPigNFuMKojN2Dk5/6J5CuLW4m+MCpQhZjaLBzr11o9pQ d7bdre7ZUYN6oK8+sBmSoUZLgnbTv8K5qAci4S2PW9NgaaBsO6 yN5rZZpSOsidu/WuWlOSCO7LVazL8bDU/gdHHnW51PZRk/dDqD j0zOA+aKnAM2sLHjB2gBFVsCXtwnnotIYNF3rSWF6 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2014-02-17 13:48:34 -0800, Jeff Janes wrote: > On Fri, Feb 14, 2014 at 2:50 PM, Andres Freund wrote: > > > On 2014-02-14 23:03:44 +0100, Clemens Eisserer wrote: > > > Hi Tom, > > > > > > Thanks for taking a look at my bug report. > > > > > > > But if you're generating WAL, it's going to get written anyway > > > > whenever a transaction commits. > > > > > > As far as I understood, this is only the case with > > > synchronous_commit=on, which is the reason why I turned synchrous > > > commit off. > > > > The WAL writer will be woken up anyway if a transaction commits > > (c.f. XLogSetAsyncXactLSN()). > > > That only happens if an 8 KB boundary has been crossed. Depending on how > big the records are that he is inserting, you can fit a lot of them in 8 > KB. If the records are small, or the table us unlogged so only commit > messages get logged, then you could go many multiples of 10s without > triggering a wake up due to crossing an 8 KB boundary. Unless I miss something we wake it up if *either* a 8kb boundary has been crossed *or* if the async lsn hasn't been flushed yet. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs