[pgsql-jp: 42102] パーティションテーブルのconstraint record(s) missing修復方法について
清水 昭博
gen @ hek.co.jp
2024年 2月 27日 (火) 03:37:37 UTC
ML各位
清水と申します
Postgresql13でディスク障害が発生した影響により認証ログを格納している
パーティションテーブルがアクセス不能になっていいます。
該当パーティションは年月でrangeパーティションとなっておりpsqlの\dコマンドで
確認した結果は以下の通りです。
パーティション元テーブル:
\d verification_codes
ERROR: 3 constraint record(s) missing for rel verification_codes_202312
正常にアクセスできるパーティション:
\d gitlab_partitions_dynamic.verification_codes_202311
Table "gitlab_partitions_dynamic.verification_codes_202311"
Column | Type | Collation | Nullable | Default
-----------------+--------------------------+-----------+----------+---------
created_at | timestamp with time zone | | not null | now()
visitor_id_code | text | | not null |
code | text | | not null |
phone | text | | not null |
Partition of: verification_codes FOR VALUES FROM ('2023-11-01 00:00:00+00') TO ('2023-12-01 00:00:00+00')
Indexes:
"verification_codes_202311_pkey" PRIMARY KEY, btree (created_at, visitor_id_code, code, phone)
"verification_codes_202311_visitor_id_code_phone_created_at_idx" UNIQUE, btree (visitor_id_code, phone, created_at)
Check constraints:
"check_9b84e6aaff" CHECK (char_length(code) <= 8)
"check_ccc542256b" CHECK (char_length(visitor_id_code) <= 64)
"check_f5684c195b" CHECK (char_length(phone) <= 50)
アクセス不能パーティション:
\d gitlab_partitions_dynamic.verification_codes_202312
ERROR: 3 constraint record(s) missing for rel verification_codes_202312
以上
データは入っていないので障害パーティションをDropしても構わないので
修復方法をご教示願えませんでしょうか。
*********************************************************
弊社はセキュリティ強化としてクラウドストレージを使った
ファイルのダウンロード方式を採用しています。
・ファイルは、以下の差出人、件名で、別途お送りします。
差出人: noreply @ cryptobin.jp
件名: 【クリプト便】[このメールと同じ件名]
・パスワードは別途メールでお送りします。
・ダウンロードの有効期限は送信日より7日間となります。
*********************************************************
pgsql-jp メーリングリストの案内