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 1hJ5O7-00034r-Cj for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2019 00:03: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 1hJ5O5-0003BZ-S1 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Apr 2019 00:03:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJ5O5-0003BI-GK for pgsql-hackers@lists.postgresql.org; Wed, 24 Apr 2019 00:03:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJ5Ny-0003kq-Nm for pgsql-hackers@lists.postgresql.org; Wed, 24 Apr 2019 00:03:44 +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 x3O03ckt014272; Tue, 23 Apr 2019 20:03:38 -0400 From: Tom Lane To: Michael Paquier cc: Postgres hackers Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6 In-reply-to: <13930.1556063692@sss.pgh.pa.us> References: <20190418011430.GA19133@paquier.xyz> <18233.1556052439@sss.pgh.pa.us> <20190423233540.GB1878@paquier.xyz> <13930.1556063692@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 23 Apr 2019 19:54:52 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14270.1556064217.1@sss.pgh.pa.us> Date: Tue, 23 Apr 2019 20:03:37 -0400 Message-ID: <14271.1556064217@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > It also seems quite odd that it doesn't fail every time; surely it's > not conditional whether we'll try to insert a new pg_class tuple or not? > We need to understand that, too. Oh! One gets you ten it "works" as long as the pg_class update is a HOT update, so that we don't actually end up touching the indexes. This explains why the crash is less likely to happen in a database where one's done some work (and, probably, created some dead space in pg_class). On the other hand, it doesn't quite fit the observation that a VACUUM FULL masked the problem ... wouldn't that have ended up with densely packed pg_class? Maybe not, if it rebuilt everything else after pg_class... regards, tom lane