On Fri, Nov 30, 2018 at 12:17 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> I dump out 27969 tables from PG v9.6.8 one by one, use "pg_dump -t xxx -f
> xxx.sql". Then start 300 threads to parallel import these .sql into
> v11.0.
> after data imported completely, parallel create constraint for every
> table.
> when all completely, execute "vacuum full",I got error "ERROR: catalog is
> missing 1 attribute(s) for relid 6855092", which occured on 11beta2 solved
> by BUG #15309.
BUG #15309 could potentially have quite a few symptoms, including this one.
> Today, I want to make sure which step cause this issue, I only start 300
> threads to parallel import these .sql, not create constraint for them.
It seems like you're asking about how to reproduce corruption with BUG
#15309 on a pre-release version of Postgres 11 (a v11 without the fix
-- commit 9353d94a). I believe that you are not actually reporting a
new bug. Is this understanding correct? Is there a new bug?
Either way, you might find it interesting to see the result of this
query, which relies on the v11 amcheck extension (so "CREATE EXTENSION
amcheck" first):
SELECT bt_index_parent_check(index => c.oid, heapallindexed => true),
c.relname,
c.relpages
FROM pg_index i
JOIN pg_opclass op ON i.indclass[0] = op.oid
JOIN pg_am am ON op.opcmethod = am.oid
JOIN pg_class c ON i.indexrelid = c.oid
JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE am.amname = 'btree' AND n.nspname = 'pg_catalog'
-- Don't check temp tables, which may be from another session:
AND c.relpersistence != 't'
-- Function may throw an error when this is omitted:
AND c.relkind = 'i' AND i.indisready AND i.indisvalid
ORDER BY c.relpages DESC;
If that doesn't raise an error, you could try the same query, but
remove "AND n.nspname = 'pg_catalog'". That will take considerably
longer, but probably won't be intolerable.
--
Peter Geoghegan