テーブルのデータ壊れる。

テーブル名 tablename(仮)のデータが壊れてしまった。
SQLを実行するとデータベースの接続が強制的に切られてしまう。

dbname=> select * from tablename offset 433974 limit 1;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>

仕方がないので、ctid をキーとしてデータを削除。

dbname=> select ctid from tablename offset 433974 limit 1;
    ctid
                      • -
(17403,12) (1 row) dbname=> delete from tablename where ctid ='(17403,12)'; DELETE 1