Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B77449F959C for ; Mon, 5 Nov 2007 09:57:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75546-06 for ; Mon, 5 Nov 2007 09:57:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 33FE19F971F for ; Mon, 5 Nov 2007 09:57:46 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA5DvjgI018364; Mon, 5 Nov 2007 08:57:45 -0500 (EST) To: Michael Goldner cc: pgsql-admin@postgresql.org Subject: Re: Database size with large objects In-reply-to: References: Comments: In-reply-to Michael Goldner message dated "Mon, 05 Nov 2007 03:41:48 -0400" Date: Mon, 05 Nov 2007 08:57:44 -0500 Message-ID: <18363.1194271064@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/51 X-Sequence-Number: 27294 Michael Goldner writes: > On 11/5/07 12:19 AM, "Tom Lane" wrote: >> It might be interesting to look at stats such as >> select sum(length(data)) from pg_largeobject; >> to confirm that your 100GB estimate for the data payload is accurate. > That select returns the following: > image=# select sum(length(data)) from pg_largeobject; > sum > -------------- > 215040008847 > (1 row) Hmm, so given that you had 34803136 pages in pg_largeobject, that works out to just about 75% fill factor. That is to say, you're only getting 3 2K rows per page and not 4. If the rows were full-size then 4 would obviously not fit (there is some overhead...) but the normal expectation in pg_largeobject is that tuple compression will shave enough space to make up for the overhead and let you get 4 rows per page. Are your large objects mostly pre-compressed data? regards, tom lane