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 1fmnpM-0006cL-W3 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Aug 2018 22:18:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fmnpK-0003Uj-Mq for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Aug 2018 22:18:10 +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 1fmnpK-0003Uc-H3 for pgsql-bugs@lists.postgresql.org; Mon, 06 Aug 2018 22:18:10 +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 1fmnpH-0007Jz-U1 for pgsql-bugs@lists.postgresql.org; Mon, 06 Aug 2018 22:18:10 +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 w76MI51Z015155; Mon, 6 Aug 2018 18:18:05 -0400 From: Tom Lane To: Peter Geoghegan cc: deathlock13@gmail.com, PostgreSQL mailing lists , Robert Haas Subject: Re: BUG #15309: ERROR: catalog is missing 1 attribute(s) for relid 760676 when max_parallel_maintenance_workers > 0 In-reply-to: References: <153329671686.1405.18298309097348420351@wrigleys.postgresql.org> <11288.1533304389@sss.pgh.pa.us> <13228.1533590989@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Mon, 06 Aug 2018 15:06:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15153.1533593885.1@sss.pgh.pa.us> Date: Mon, 06 Aug 2018 18:18:05 -0400 Message-ID: <15154.1533593885@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > On Mon, Aug 6, 2018 at 2:29 PM, Tom Lane wrote: >> Hm. Post-beta3, I think I'd vote for a conservative fix in v11, >> which seems to be "ban for mapped catalogs". Feel free to make >> it work in HEAD, though. > Makes sense. I'm not sure if it's worth pursuing parallel mapped > catalog index builds much further, though. I doubt that ordinary users > care about whether or not this is supported, so this is a matter of > principle. I don't feel strongly on whether or not I should make > mapped builds work on HEAD, so I defer to you, and anyone else that > might have an interest. Does it matter, do you think? Apparently there are people out there with catalogs big enough to justify parallel reindex. I don't mind if the first version of the feature doesn't handle that, but probably we should make it work eventually. > It might be worth teaching heap_beginscan_parallel() to > cross-check each worker's heap relation's rd_smgr.smgr_node to a version > of the same field from the leader, stored in shared memory (in the > ParallelHeapScanDesc). That way, any future recurrence of a similar > bug will be far easier to detect. A "can't happen" error along these > lines seems like it would be worthwhile. Well, maybe, but why is that field particularly vulnerable? I'd think you should crosscheck the index's relfilenode too, at least, if you're going to worry about that. regards, tom lane