Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnnkn-00007N-AA for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2019 17:30:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hnnkm-0003Y2-77 for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2019 17:30:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnniE-0002Rc-0w for pgsql-general@lists.postgresql.org; Wed, 17 Jul 2019 17:27:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnniB-0003gt-Tw for pgsql-general@postgresql.org; Wed, 17 Jul 2019 17:27:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6HHRNXt026266; Wed, 17 Jul 2019 13:27:23 -0400 From: Tom Lane To: Peter Geoghegan cc: Aaron Pelz , pgsql-general General Subject: Re: Corrupt index stopping autovacuum system wide In-reply-to: References: <24777.1563382630@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Wed, 17 Jul 2019 10:18:19 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26264.1563384443.1@sss.pgh.pa.us> Date: Wed, 17 Jul 2019 13:27:23 -0400 Message-ID: <26265.1563384443@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > On Wed, Jul 17, 2019 at 9:57 AM Tom Lane wrote: >> It looks that way, but how would a broken non-shared index have held up >> autovacuuming in other databases? Maybe, as this one's xmin horizon >> got further and further behind, the launcher eventually stopped >> considering launching workers into any other databases? That seems >> like a bad thing; it's postponing work that will need to be done >> eventually. > I don't know exactly how the launcher would behave offhand, but it's > clear that not being able to VACUUM one table in one database (because > it has a corrupt index) ultimately risks the availability of every > database in the cluster. Many installations receive little to no > supervision, so it may just be a matter of time there. That is > certainly a bad thing. Right, you're eventually going to get to a forced shutdown if vacuum never succeeds on one table; no question that that's bad. My concern here is that if we have blinders on to the extent of only processing that one table or DB, we're unnecessarily allowing bloat to occur in other tables, and causing that missed vacuuming work to pile up so that there's more of it to be done once the breakage is cleared. If the DBA doesn't notice the problem until getting into a forced shutdown, that is going to extend his outage time --- and, in a really bad worst case, maybe make the difference between being able to recover at all and not. regards, tom lane