Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1159964FFE0 for ; Thu, 27 Nov 2008 17:29:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70031-04 for ; Thu, 27 Nov 2008 17:29:49 -0400 (AST) 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 66DA564FD9A for ; Thu, 27 Nov 2008 17:29:49 -0400 (AST) 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 mARLTcLw011059; Thu, 27 Nov 2008 16:29:38 -0500 (EST) To: vegard.bones@met.no cc: pgsql-performance@postgresql.org Subject: Re: Deteriorating performance when loading large objects In-reply-to: <49362.85.166.86.82.1227812685.squirrel@webmailsunny.oslo.dnmi.no> References: <63696.85.166.86.82.1227617663.squirrel@webmailsunny.oslo.dnmi.no> <14976.1227620206@sss.pgh.pa.us> <49362.85.166.86.82.1227812685.squirrel@webmailsunny.oslo.dnmi.no> Comments: In-reply-to "=?iso-8859-1?Q?Vegard_B=F8nes?=" message dated "Thu, 27 Nov 2008 19:04:45 +0000" Date: Thu, 27 Nov 2008 16:29:38 -0500 Message-ID: <11058.1227821378@sss.pgh.pa.us> From: Tom Lane 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: 200811/287 X-Sequence-Number: 32018 "=?iso-8859-1?Q?Vegard_B=F8nes?=" writes: > Running VACUUM VERBOSE pg_largeobject took quite some time. Here's the > output: > INFO: vacuuming "pg_catalog.pg_largeobject" > INFO: index "pg_largeobject_loid_pn_index" now contains 11060658 row > versions in 230587 pages > DETAIL: 178683 index pages have been deleted, 80875 are currently reusable. > CPU 0.92s/0.10u sec elapsed 199.38 sec. > INFO: "pg_largeobject": found 0 removable, 11060658 nonremovable row > versions in 6849398 pages > DETAIL: 0 dead row versions cannot be removed yet. > There were 84508215 unused item pointers. > 0 pages are entirely empty. > CPU 0.98s/0.10u sec elapsed 4421.17 sec. > VACUUM Hmm ... although you have no dead rows now, the very large number of unused item pointers suggests that there were times in the past when pg_largeobject didn't get vacuumed often enough. You need to look at your vacuuming policy. If you're using autovacuum, it might need to have its parameters adjusted. Otherwise, how often are you vacuuming, and are you doing it as superuser? > I will try to run VACUUM ANALYZE FULL after the next delete tonight, as > suggested by Ivan Voras in another post. Actually, a CLUSTER might be more effective. regards, tom lane