3

When trying to upgrade my databases from Postgresql 9.5.4 to 9.6.3, two tables are corrupted.

$ /usr/local/Cellar/postgresql/9.5.4_1/bin/pg_catcheck -h localhost -p 5434 db_concepts_2
notice: pg_type row has invalid typrelid "16439": no matching entry in pg_class
row identity: oid="16441"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="custid" attnum="1"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="firstname" attnum="2"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="lastname" attnum="3"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="dateofbirth" attnum="4"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="telephoneno" attnum="5"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="ctid" attnum="-1"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="xmin" attnum="-3"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="cmin" attnum="-4"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="xmax" attnum="-5"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="cmax" attnum="-6"
notice: pg_attribute row has invalid attrelid "16439": no matching entry in pg_class
row identity: attrelid="16439" attname="tableoid" attnum="-7"
notice: pg_class row has invalid relnatts "10": attribute 5 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_class row has invalid relnatts "10": attribute 6 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_class row has invalid relnatts "10": attribute 7 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_class row has invalid relnatts "10": attribute 8 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_class row has invalid relnatts "10": attribute 9 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_class row has invalid relnatts "10": attribute 10 does not exist in pg_attribute
row identity: oid="16431" relname="purchase_purchid_seq" relkind="S"
notice: pg_depend row has invalid refobjid "16439": no matching entry in pg_class
row identity: classid="1247" objid="16441" objsubid="0" refclassid="1259" refobjid="16439" refobjsubid="0" deptype="i"
notice: pg_depend row has invalid objid "16439": no matching entry in pg_class
row identity: classid="1259" objid="16439" objsubid="0" refclassid="2615" refobjid="2200" refobjsubid="0" deptype="n"
progress: done (20 inconsistencies, 0 warnings, 0 errors)


$ /usr/local/Cellar/postgresql/9.5.4_1/bin/pg_catcheck -h localhost -p 5434 dataviz
notice: pg_class row has invalid relnatts "3": attribute 1 does not exist in pg_attribute
row identity: oid="16388" relname="pg_toast_16385" relkind="t"
notice: pg_class row has invalid relnatts "3": attribute 2 does not exist in pg_attribute
row identity: oid="16388" relname="pg_toast_16385" relkind="t"
notice: pg_class row has invalid relnatts "3": attribute 3 does not exist in pg_attribute
row identity: oid="16388" relname="pg_toast_16385" relkind="t"
notice: pg_class row has invalid relnatts "2": attribute 1 does not exist in pg_attribute
row identity: oid="16390" relname="pg_toast_16385_index" relkind="i"
notice: pg_class row has invalid relnatts "2": attribute 2 does not exist in pg_attribute
row identity: oid="16390" relname="pg_toast_16385_index" relkind="i"
notice: pg_class row has invalid relnatts "6": attribute 1 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
notice: pg_class row has invalid relnatts "6": attribute 2 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
notice: pg_class row has invalid relnatts "6": attribute 3 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
notice: pg_class row has invalid relnatts "6": attribute 4 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
notice: pg_class row has invalid relnatts "6": attribute 5 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
notice: pg_class row has invalid relnatts "6": attribute 6 does not exist in pg_attribute
row identity: oid="16385" relname="tesco_items" relkind="r"
progress: done (11 inconsistencies, 0 warnings, 0 errors)

How do I fix these errors?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.