小编dil*_*ddy的帖子

恢复PostgreSQL数据库时出错"无效字节序列"

今天早些时候,我试图使用pgAdmin III从生产中恢复我的PostgreSQL(8.1.22)数据库.但是,在恢复过程完成后,它开始抛出错误,如:

WARNING: errors ignored on restore: 4 
Run Code Online (Sandbox Code Playgroud)

此外,经过调查,我发现所有表中有3个表尚未恢复(包含0行).当我检查日志时,我在3个表附近发现了以下错误:

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
Run Code Online (Sandbox Code Playgroud)

我尝试在Google上研究我的问题,但没有结果.请帮助恢复这三个表没有任何错误.

postgresql database-restore database-backups postgresql-9.1 postgresql-8.4

2
推荐指数
1
解决办法
4698
查看次数