小编Ric*_*mas的帖子

带有 `jobs` 标志的 `pg_restore` 导致 `pg_restore: 错误:一个工作进程意外死亡`

我有一个运行以下内容的脚本:

pg_restore tmp/latest.backup --verbose --clean --no-acl --no-owner --dbname hub_development --jobs=12
Run Code Online (Sandbox Code Playgroud)

这经常失败并出现以下错误:

error: could not find block ID 4584 in archive -- possibly due to out-of-order restore request, which cannot be handled due to lack of data offsets in archive

pg_restore: error: a worker process died unexpectedly
Run Code Online (Sandbox Code Playgroud)

反过来,这个错误意味着应该有索引、主键等的表最终没有它们。例如,在没有多核的情况下运行时,我们的users表如下所示,正如预期的那样:


                                           Table "public.users"
       Column       |            Type             | Collation | Nullable |              Default              
--------------------+-----------------------------+-----------+----------+-----------------------------------
 id                 | integer                     |           | not null | nextval('users_id_seq'::regclass)
 created_at         | timestamp without time zone |           | not null …
Run Code Online (Sandbox Code Playgroud)

postgresql pg-restore

9
推荐指数
1
解决办法
1366
查看次数

标签 统计

pg-restore ×1

postgresql ×1