【问题标题】:restore postgresql on pythonanywhere from sql-format dump从 sql 格式转储恢复 pythonanywhere 上的 postgresql
【发布时间】: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


    【解决方案1】:

    答案:

    postgres=# grant usage on schema public to public; postgres=# grant create on schema public to public; postgres=# \d (我所有的桌子都出现了——太棒了)

    【讨论】:

      猜你喜欢
      • 2012-01-19
      • 1970-01-01
      • 1970-01-01
      • 2015-01-26
      • 2021-02-04
      • 2011-07-24
      • 2022-11-03
      • 2014-02-19
      • 2020-12-07
      相关资源
      最近更新 更多