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 1hnoYl-0002Vx-SE for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2019 18:21:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hnoYk-0000wN-Nd for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2019 18:21:46 +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 1hnoYk-0000wG-EK for pgsql-general@lists.postgresql.org; Wed, 17 Jul 2019 18:21:46 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnoYh-0004NQ-Jz for pgsql-general@postgresql.org; Wed, 17 Jul 2019 18:21:46 +0000 Received: by mail-qk1-x742.google.com with SMTP id s145so18285240qke.7 for ; Wed, 17 Jul 2019 11:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=VijX4vtgsJB/O6b9IgRJgCrPFsXFijPsK2gTuCIAJA8=; b=knw2QSl+C5prCQjWgi1o35EIXoSmzeKBX+9c3c1ZeR5BEYKcFwEtrwDe22K6/QS3s/ m+6VyY5ZIGiAj25U/qzb0d+hpRhiUNulEq3HrFdrfyT+lS2XEsGthhtejgAwdbVwXveK aq3AHd/fD8bZ4k0Hmo0eTwIi5zBqTwYefHq81Gi7ttEJBs5kNzHhXoREiAdRqyEeziLu nPrCpjPzRIkl+6Vlgj6GJomeTy1fPdxe4pTGddBkn7rJH3aE7gHM8gFa7Tznfhmow/X6 n4DWr96dUov02KGr1m8FvyRrreA6hipc8b0gWK/NCN9OoGOVbiNesucNz9dPy9a8xTal jh7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VijX4vtgsJB/O6b9IgRJgCrPFsXFijPsK2gTuCIAJA8=; b=cSp8+ka/NOpe2Jpmi6pBFKqikwRq5v4s2J/HwvF7/wJRuToDMrxEufkE+RWUT5stVl En6XaPhgRFAbxn3tFkvGCY/2vnsGfU9Xbmr++RpDLtq7Xxe0Axw/h2Mh3S8jF0sKWkNJ cp3rD9tXx/Y7zcMQEtzQGGoX/FuKK/C05MgSJOhjRDuR5PVW9d6NFLYzZQxCVbLG9xFy KVecM5uGHA+yt9T8K6ECUfO2Dx8yon6Imky1Of6khHQ5c6CP21DPxbLUQ1IdHxPE306a 86LH4SuQxg3hFVN8NrcbuFkLj7ixznV4AqFL1LOtv1irslOzkwdAE92g7HJHMbs2/WN4 K8Pg== X-Gm-Message-State: APjAAAW2GgDsv9SbKF7n44xdsggG0r0Kf2s5l1/2iSE4uavYkoLUzlP6 kPLkxYR8gFS4AooTfikfaw9Iog== X-Google-Smtp-Source: APXvYqzfRdfo6PPq2WiqpKR0KMnaVAUA+DP+F1GbVo2152Xg73Hcwh9/ytH1BAeNQWjSSHpf9s+rOg== X-Received: by 2002:ae9:ee0b:: with SMTP id i11mr25987934qkg.424.1563387702171; Wed, 17 Jul 2019 11:21:42 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.198]) by smtp.gmail.com with ESMTPSA id x23sm10284913qtp.37.2019.07.17.11.21.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 11:21:41 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id E3B6F1202CC; Wed, 17 Jul 2019 14:21:38 -0400 (-04) Date: Wed, 17 Jul 2019 14:21:38 -0400 From: Alvaro Herrera To: Peter Geoghegan Cc: Tom Lane , Aaron Pelz , pgsql-general General Subject: Re: Corrupt index stopping autovacuum system wide Message-ID: <20190717182138.GA25244@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-17, Peter Geoghegan wrote: > Maybe nbtree VACUUM should do something more aggressive than give up > when there is a "failed to re-find parent key" or similar condition. > Perhaps it would make more sense to make the index inactive (for some > value of "inactive") instead of just complaining. That might be the > least worst option, all things considered. Maybe we can mark an index as unvacuumable in some way? As far as I understand, all queries using that index work, as do index updates; it's just vacuuming that fails. If we mark the index as unvacuumable, then vacuum just skips it (and does not run phase 3 for that table), and things can proceed; the table's age can still be advanced. Obviously it'll result in more bloat than in normal condition, but it shouldn't cause the whole cluster to go down. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services