Re: BUG #15309: ERROR: catalog is missing 1 attribute(s) for relid 760676 when max_parallel_maintenance_workers > 0
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: deathlock13@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Robert Haas <robertmhaas@gmail.com>
Date: 2018-08-07T02:32:42Z
Lists: pgsql-bugs
On Mon, Aug 6, 2018 at 3:21 PM, Peter Geoghegan <pg@bowt.ie> wrote: > On Mon, Aug 6, 2018 at 3:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> 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. > > Okay. I'll pursue this in HEAD. I wrote this in a little over an hour, and it works fine. I'll post it shortly, once I polish it up some more. I'll also post an alternative "no mapped relation parallel builds" fix for v11, which will be trivial. >> 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. > > I agree. > > I'd like to hear more opinions on the general idea. I'm particularly > interested in what Robert thinks. On second thought, the crosscheck of the index's relfilenode seems like independent work. I won't be working on it as part of the fix for this bug. The question of index relfilenode becoming stale or inconsistent doesn't come up with parallel CREATE INDEX, since currently the workers never write to the new index relfilenode. If we were going to do a similar crosscheck for parallel index scan, the new code would be need to be spread across places like btbeginscan(), and RelationGetIndexScan(). It's not something that can just be done in passing. -- Peter Geoghegan
Commits
-
Handle parallel index builds on mapped relations.
- 4974d7f87e62 12.0 landed
- 9353d94a9b70 11.0 landed
-
Transfer state pertaining to pending REINDEX operations to workers.
- 29d58fd3adae 11.0 cited