Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 33E23B5DC5B for ; Tue, 12 Jul 2011 22:16:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87993-04 for ; Wed, 13 Jul 2011 01:16:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 992AAB5DC52 for ; Tue, 12 Jul 2011 22:16:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p6D1GbhV021640; Tue, 12 Jul 2011 21:16:38 -0400 (EDT) To: Jeff Janes cc: lars , Kevin Grittner , Ivan Voras , pgsql-performance@postgresql.org Subject: Re: UPDATEDs slowing SELECTs in a fully cached database In-reply-to: References: <4E16479D.3050605@yahoo.com> <4E1A0CBC.6090009@yahoo.com> <4E1A31AB.9010201@postnewspapers.com.au> <1310359653.80687.YahooMailRC@web121705.mail.ne1.yahoo.com> <4E1AEDAB020000250003F1C3@gw.wicourts.gov> <4E1B41EA.90104@yahoo.com> <4E1B05CC020000250003F1E6@gw.wicourts.gov> <4E1B810D.4070404@yahoo.com> <4E1B90AF.1020408@yahoo.com> <4E1C9A05.7060005@yahoo.com> <4E1C5563020000250003F252@gw.wicourts.gov> <4E1CA8E9.6090108@yahoo.com> Comments: In-reply-to Jeff Janes message dated "Tue, 12 Jul 2011 20:35:54 -0400" Date: Tue, 12 Jul 2011 21:16:37 -0400 Message-ID: <21639.1310519797@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/131 X-Sequence-Number: 44343 Jeff Janes writes: > On 7/12/11, lars wrote: >> The fact that a select (maybe a big analytical query we'll run) touching >> many rows will update the WAL and wait >> (apparently) for that IO to complete is making a fully cached database >> far less useful. >> I just artificially created this scenario. > I can't think of any reason that that WAL would have to be flushed > synchronously. Maybe he's running low on shared_buffers? We would have to flush WAL before writing a dirty buffer out, so maybe excessive pressure on available buffers is part of the issue here. regards, tom lane