Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 6647D7591C6 for ; Thu, 24 May 2012 19:13:25 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SXgHa-0003Gn-NY for pgsql-bugs@postgresql.org; Thu, 24 May 2012 22:13:24 +0000 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 q4OMD6Ja002197; Thu, 24 May 2012 18:13:06 -0400 (EDT) To: Jeff Frost cc: pgsql-bugs@postgresql.org Subject: Re: 9.1.3 backends getting stuck in 'startup' In-reply-to: <4FBE9CDB.3030009@pgexperts.com> References: <4F9AC452.3050102@pgexperts.com> <28484.1337887297@sss.pgh.pa.us> <4FBE9CDB.3030009@pgexperts.com> Comments: In-reply-to Jeff Frost message dated "Thu, 24 May 2012 13:40:59 -0700" Date: Thu, 24 May 2012 18:13:06 -0400 Message-ID: <2196.1337897586@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/191 X-Sequence-Number: 33162 Jeff Frost writes: > On 05/24/12 12:21, Tom Lane wrote: >> How big is pg_attribute normally in this database? I'm suspicious that >> what triggered this is some major bloating of pg_attribute (and maybe >> some of the other catalogs too). > So, the current working system's pg_attribute looks like: > select pg_size_pretty(pg_relation_size('pg_catalog.pg_attribute')); > pg_size_pretty > ---------------- > 1671 MB > (1 row) > and on the old broken system: > select pg_size_pretty(pg_relation_size('pg_catalog.pg_attribute')); > pg_size_pretty > ---------------- > 1858 MB > (1 row) Huh. A bit bigger, but not by that much. It doesn't seem like this would be enough to make seqscan performance fall off a cliff, as it apparently did. Unless maybe the slightly-bloated catalogs were just a bit too large to fit in RAM, and so the repeated seqscans went from finding all their data in kernel disk buffers to finding none of it? > So, interestingly, they're both quite large, but the old broken system is > quite a bit larger. Any other data points be helpful? I think it would be interesting to get the pg_relation_size for pg_class plus pg_attribute plus pg_index (which I think is everything that gets seqscannedd in this way) on both systems, and see how those numbers match up to total RAM on the box. regards, tom lane