我的笔记本电脑 (mac) 上的 postgres 数据库中有大约 50GB 的数据,我需要将这些数据传输到我的新电脑 (windows)。我已经使用我需要传输的模式的 pg_dump 生成了 tar 转储,但是 pg_restore 只是挂起。
为了消除文件大小的问题以及源是 mac 的事实,我将其归结为我能找到的最简单的测试用例,即在我的 PC 上以新模式创建一个新表,使用导出它pg dump 然后尝试将其恢复到同一个数据库中。即使有这么简单的事情, pg_restore 也会挂起。我显然错过了一些东西 - 可能很明显。有任何想法吗?
D:\Share\dbexport>psql -U postgres
Password for user postgres:
psql (12.1)
WARNING: Console code page (850) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=# create schema new_schema
postgres-# create table new_schema.new_table(id numeric);
CREATE SCHEMA
postgres=# insert into new_schema.new_table …Run Code Online (Sandbox Code Playgroud) postgresql ×1