【发布时间】:2019-07-31 17:15:53
【问题描述】:
我将 PythonAnywhere 升级到了 99 美元的启动计划并创建了一个 PostgreSQL 数据库。 PythonAnywhere 数据库页面显示:
Address: magula6-1249.postgres.pythonanywhere-services.com
Port: 11249
Superuser role name: super
我想从我的 macbook 上创建的 pg-dump 文件填充我的新数据库。
我尝试了几种变体:
$ psql -H magula6-1249.postgres.pythonanywhere-services.com -U super -p
11249 -f 2019_7_30_pgdump.sql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11249"?
我也试过:
postgres=# \i /home/magula6/cogswatch/2019_7_30_pgdump.sql
tpsql:/home/magula6/cogswatch/2019_7_30_pgdump.sql:149: ERROR: function "function_correctiveaction" already exists with s
ame argument types
奇怪的是 Pythonanywhere 数据库页面说:
Postgres disk usage:
100% full (1.0 GB of your 1.0 GB quota)
但数据库显示为空:
postgres=# \d
No relations found.
【问题讨论】:
标签: postgresql psql restore