Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 0CAE72E004F for ; Thu, 15 May 2008 13:19:46 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21193-04 for ; Thu, 15 May 2008 13:19:29 -0300 (ADT) 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 developer.postgresql.org (Postfix) with ESMTP id 136F52E002D for ; Thu, 15 May 2008 13:19:28 -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 m4FGJELU006228; Thu, 15 May 2008 12:19:14 -0400 (EDT) To: Alvaro Herrera cc: Heikki Linnakangas , Greg Smith , Pavan Deolasee , pgsql-performance@postgresql.org Subject: Re: I/O on select count(*) In-reply-to: <20080515154932.GB8221@alvh.no-ip.org> References: <920841.71690.qm@web44808.mail.sp1.yahoo.com> <482B1D5F.EE98.0025.0@wicourts.gov> <20080515020553.GN9838@alvh.no-ip.org> <2e78013d0805141940x50c3f51u439019e8e592959@mail.gmail.com> <20080515144106.GA8221@alvh.no-ip.org> <482C53A6.2030802@enterprisedb.com> <20080515154932.GB8221@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 15 May 2008 11:49:32 -0400" Date: Thu, 15 May 2008 12:19:14 -0400 Message-ID: <6227.1210868354@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/224 X-Sequence-Number: 30192 Alvaro Herrera writes: > Heikki Linnakangas escribió: >> We know what kind of a relation we're dealing with in ReadBuffer, so we >> could add a flag to BufferDesc to mark heap pages. > Hmm, I was thinking that it would need access to the catalogs to know > where the tuples are, but that's certainly not true, so perhaps it could > be made to work. The issue in my mind is not so much could bgwriter physically do it as that it's a violation of module layering. That has real consequences, like potential for deadlocks. It'll become particularly pressing if we go forward with the plans to get rid of the separate dedicated buffers for pg_clog etc and have them work in the main shared-buffer pool. regards, tom lane