数据仓库服务 GAUSSDB(DWS)-DWS元数据不一致-分区索引异常:处理方法

时间:2024-11-02 18:44:29

处理方法

  1. 删除该表索引信息。
    1
    DROP INDEX a_0317_index;
    
  2. 对该表索引进行重建。
    1
    CREATE INDEX a_0317_index on a_0317(a) local (partition p1_index, partition p2_inde);
    
  3. 查看表定义无报错。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    \d+ a_0317
                            Table "public.a_0317"
     Column |  Type   | Modifiers | Storage | Stats target | Description
    --------+---------+-----------+---------+--------------+-------------
     a      | integer |           | plain   |              |
    Indexes:
        "a_0317_index" btree (a) LOCAL(PARTITION p1_index, PARTITION p2_inde)  TABLESPACE pg_default
    Range partition by(a)
    Number of partition: 2 (View pg_partition to check each partition range.)
    Has OIDs: no
    Distribute By: HASH(a)
    Location Nodes: ALL DATANODES
    Options: orientation=row, compression=no
    
support.huaweicloud.com/trouble-dws/dws_09_0105.html