今天早些时候,我试图使用PostgreSQL III从生产中恢复我的pgAdmin (8.1.22)数据库。但是,在恢复过程完成之后,它开始抛出以下错误:
WARNING: errors ignored on restore: 4
此外,经过调查,我发现在所有表中,有3个表没有被恢复(包含0行)。当我检查日志时,我发现了三个表附近的折叠错误:
pg_restore: [archiver (db)] Error from TOC entry 5390; 0 442375 TABLE DATA tablename postgres
pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xea0942
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
CONTEXT: COPY tablename , line 7875
我试着在谷歌上研究我的问题,但没有结果。请帮助恢复这三个表,没有任何错误。
发布于 2013-07-05 03:51:54
较早版本的PostgreSQL对UTF-8遵从性没有新版本那么严格.您大概是在尝试将包含无效UTF-8的数据从这样的旧版本恢复到更新的版本。
无效的字符串必须清除。对于由于以下错误而未导入的每个表,您可以遵循该过程:
iconv
自动删除这些字符:
-c -f UTF-8 -t UTF-8 明文-清除.UTFhttps://stackoverflow.com/questions/17487501
复制相似问题