Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 5EDEA9FB5A4 for ; Thu, 17 May 2007 11:23:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 19784-03 for ; Thu, 17 May 2007 11:23:09 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by postgresql.org (Postfix) with ESMTP id 0E4E49FB4E0 for ; Thu, 17 May 2007 11:23:14 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i28so516165wxd for ; Thu, 17 May 2007 07:23:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=hSrR96GFtpxr9rwI5K69cg9a0dtSFCnPFpu+l0dgGtUIne1B56WV3yo8ongDqZY+3mgb2EC5+xOOQNlQ7+aPyAZbjYjy7qkzEnDNqoTEQ8ubG2E/w2cNz6ZKEWbLSoipRD1lPobCwAw7Qmpulk7/ZeAglyVYeGHLDx8m+L+py9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=JpzyxckcH6u3WFqja1/DSh36zsV/vX8JcTL81ER5PtSL6DVGC36sNPO0OA8pYwpWE4BfswwGpWMrd+ZACNfv3CHWvHMsiCseBVFusH47c5j1wibMAslobZzz+sZRyigE5giNlVeQ4gPfbuhe9MvusH/+d4yO7F7ZcaiOWUFXflo= Received: by 10.90.34.3 with SMTP id h3mr544191agh.1179411792883; Thu, 17 May 2007 07:23:12 -0700 (PDT) Received: from ?172.24.32.125? ( [62.232.55.118]) by mx.google.com with ESMTP id e33sm597743ugd.2007.05.17.07.23.08; Thu, 17 May 2007 07:23:11 -0700 (PDT) Message-ID: <464C6544.9070104@enterprisedb.com> Date: Thu, 17 May 2007 15:23:00 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: kadams@mxlogic.com CC: pgsql-performance@postgresql.org Subject: Re: WAL log performance/efficiency question References: <1179410671.26604.3.camel@MXLRMT-208.corp.mxlogic.com> In-Reply-To: <1179410671.26604.3.camel@MXLRMT-208.corp.mxlogic.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/299 X-Sequence-Number: 24689 Keaton Adams wrote: > Using an 8K data page: > > 8K data page (8192 bytes) > Less page header and row overhead leaves ~8000 bytes > At 100 bytes per row = ~80 rows/page > Rows loaded: 250,000 / 80 = 3125 data pages * 8192 = 25,600,000 bytes / > 1048576 = ~ 24.4 MB of data page space. That's not accurate. There's 32 bytes of overhead per row, and that gives you just 61 tuples per page. Anyhow, I'd suggest measuring the real table size with pg_relpages function (from contrib/pgstattuple) or from pg_class.relpages column (after ANALYZE). > We are running on PostgreSQL 8.1.4 and are planning to move to 8.3 when > it becomes available. Are there space utilization/performance > improvements in WAL logging in the upcoming release? One big change in 8.3 is that COPY on a table that's been created or truncated in the same transaction doesn't need to write WAL at all, if WAL archiving isn't enabled. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com