Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 66BD364FD2A for ; Tue, 28 Oct 2008 13:46:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15728-08 for ; Tue, 28 Oct 2008 13:45:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137093.authsmtp.net (outmail137093.authsmtp.net [62.13.137.93]) by postgresql.org (Postfix) with ESMTP id 7294064FCFD for ; Tue, 28 Oct 2008 13:45:58 -0300 (ADT) Received: from mail-c189.authsmtp.com (mail-c189.authsmtp.com [62.13.128.71]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m9SGjJBi032933; Tue, 28 Oct 2008 16:45:19 GMT Received: from [192.168.0.3] (85-211-99-122.dyn.gotadsl.co.uk [85.211.99.122]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m9SGjGU9057043; Tue, 28 Oct 2008 16:45:17 GMT Subject: Re: Updating FSM on recovery From: Simon Riggs To: Tom Lane Cc: Heikki Linnakangas , PostgreSQL-development In-Reply-To: <7992.1225210576@sss.pgh.pa.us> References: <49072021.7010801@enterprisedb.com> <1225208150.3971.191.camel@ebony.2ndQuadrant> <1225209751.3971.196.camel@ebony.2ndQuadrant> <7992.1225210576@sss.pgh.pa.us> Content-Type: text/plain Date: Tue, 28 Oct 2008 16:45:14 +0000 Message-Id: <1225212314.3971.206.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: ce0d376c-a50f-11dd-bc7a-001f29070be2 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFag1bYlpF HGQLW1xEUVt7XWZ/ agMfZQBDYEtPQQxj TklLQE1QEQdtHhxP Wxd9JUMFEgxGfXlw YUUsX3dSXAopIEYp QUlSRnBXYGc2dWEe BBRFJVBTIR5Kfh4T aFl/U3NfNGdJBC9q VzwTFhsSEA9kHWxo Wg0EMVMUTg4lJRt0 QBZKBzgkGlMIXTRb X-Authentic-SMTP: 61633235383639.kestrel.dmpriest.net.uk:1378/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/1422 X-Sequence-Number: 126439 On Tue, 2008-10-28 at 12:16 -0400, Tom Lane wrote: > Simon Riggs writes: > > Or possibly an XLogInsertDeferred() which just queues up some work so > > the next time we call XLogInsert() it will insert the deferred work as > > well as the main work all in one lock cycle. It would only be usable for > > low priority info like FSM stuff that isn't needed for recovery. Maybe > > we could do that with hints also. > > If it isn't needed for recovery, why would we be logging it at all? You just agreed that the info didn't need to be very accurate. There's a few things on the server that aren't needed for recovery, but it might be useful if they were logged occasionally to give roughly correct values. Contention on WALInsertLock seems to be a problem, yet writing WAL to disk is not a bottleneck. Deferring writing it slightly to allow things to be batched might be one way of smoothing the impact of that type of operation. That might be better than a heuristic method of reducing the number of inserts. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support