psql: FATAL: index "pg_attribute_relid_attnum_index" contains unexpected zero page at block 0 有一个脚本,定时去查询主从的状态,发现报错了 [root@pg01 scripts]#./pg_ms_status.shpsql: FATAL: index"pg_attribute_relid_attnum_index"contains unexpected zero page at block 0HINT: Please REINDEX i...
pg_filedump -m pg_filenode.map | grep OID | grep 2658 | awk '{print "Relname:pg_attribute_relid_attnam_index " $1" "$2" "$3" "$4}' pg_filedump -m pg_filenode.map | grep OID | grep 2659 | awk '{print "Relname:pg_attribute_relid_attnum_index " $1" "$2" "$3" "$4...
False supports rollback: False affected rows: None Action: AddColumnAction Error class: UniqueViolation Error code: 23505 Error message: ERROR: duplicate key value violates unique constraint "pg_attribute_relid_attnum_index" CONTEXT: Catalog Version Mismatch: A DDL occurred while processing this quer...
pg_catalog.pg_class_oid_index | pg_catalog.pg_class | 2456 | 2456 | 2456 | 0 | 4951 pg_catalog.pg_attribute_relid_attnum_index | pg_catalog.pg_attribute | 1433 | 3737 | 3737 | 1 | 2901 pg_catalog.pg_cast_source_target_index | pg_catalog.pg_cast | 598 | 159 | 159 | 0 |...
pg_auth_members_role_member_index: 1024 total in 1 blocks; 280 free (0 chunks); 744 used pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used pg_ts_config_cfgname_index: 1024 total in 1 blocks; 280 free (0 chunks); 744 used ...
a.attgenerated FROM pg_catalog.pg_attribute a JOIN pg_catalog.pg_class c ON a.attrelid = c.oid JOIN pg_catalog.pg_namespace n ON c.relnamespace = n.oid LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid) WHERE a.attrelid = $1 ...
pg_attribute.attnum 长度为partnatts值的数组,指示分区键的组成部分。例如,取值1 3表示第一和第三个列组成了分区键。该数组中的零表示对应的分区键列是一个表达式而不是简单的列引用。 partclass oidvector pg_opclass.oid partclass包含分区键中每一列要使用的操作符类的OID。详见pg_opclass。 partcollation ...
pg_attribute_relid_attnum_index | i |384kB pg_type | r |288kB gp_persistent_relation_node | r |288kB pg_class | r |288kB pg_authid_oid_index | i |192kB pg_authid_rolname_index | i |192kB pg_amproc_oid_index | i |192kB ...
又见pg_attribute.attnum。 relchecks int2 表里的CHECK约束的数目;参阅pg_constraint表 relhasoids bool 如果为关系中每行都生成一个 OID 则为真 relhaspkey bool 如果这个表有一个(或者曾经有一个)主键,则为真。 relhasrules bool 如表有(或曾经有)规则就为真;参阅pg_rewrite表 relhastriggers bool...
CREATE UNIQUE INDEX CONCURRENTLY ON mytbl USING btre e (id); -- CREATE INDEX 1. 2. 此时id 字段上有两个索引: SELECT schemaname, relname, indexrelname, pg_relation_size (indexrelid) AS index_size, idx_scan , idx_tup_read , idx_tup_fetch ...