Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fmnm4-0006RO-Rd for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Aug 2018 22:14:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fmnm3-0001Yk-6K for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Aug 2018 22:14:47 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fmnm3-0001Yd-07 for pgsql-bugs@lists.postgresql.org; Mon, 06 Aug 2018 22:14:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fmnm0-0007Db-FP for pgsql-bugs@lists.postgresql.org; Mon, 06 Aug 2018 22:14:46 +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 w76MEddV014966; Mon, 6 Aug 2018 18:14:39 -0400 From: Tom Lane To: Alvaro Herrera cc: Peter Geoghegan , deathlock13@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #15309: ERROR: catalog is missing 1 attribute(s) for relid 760676 when max_parallel_maintenance_workers > 0 In-reply-to: <20180806221023.63mes2onr2tumyoo@alvherre.pgsql> References: <20180806221023.63mes2onr2tumyoo@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 06 Aug 2018 18:10:23 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14964.1533593679.1@sss.pgh.pa.us> Date: Mon, 06 Aug 2018 18:14:39 -0400 Message-ID: <14965.1533593679@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2018-Aug-06, Peter Geoghegan wrote: >> Sure enough, that's what the bug is - a few debugging calls to >> RelationMapFilenodeToOid() within nbtsort.c proves it. > Uh, that's weird, isn't it? I mean, why is the relfilenode changing > underneath? Because we're building a brand new index in a new file. > Why isn't it blocked by the CREATE INDEX? Or is CREATE > INDEX inflicting that upon itself? The problem is (or so I assume) failure to propagate process-local state of relmapper.c into the worker processes. So the leader knows that we've assigned a new relfilenode to some mapped index, but the workers don't. regards, tom lane