我正在使用 RDS Postgres 作为分析数据仓库,并希望通过 pgadmin 连接到它。我能够连接到数据库,但 pgadmin 没有选择我的默认数据库,即我anchor_reporting
在 RDS DB 实例开始时创建的数据库(名为:)。
当我通过 psql 命令行工具连接到我的数据库服务器时,我可以看到 anchor_reporting 及其内容。如下所示:
postgres=> \l+
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description
------------------+-----------------+----------+-------------+-------------+-------------------------------------+-----------+------------+--------------------------------------------
anchor_reporting | reporting_admin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/reporting_admin +| 9845 kB | pg_default | default template for new databases
| | | | | reporting_admin=CTc/reporting_admin | | |
postgres | reporting_admin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 7909 kB | pg_default | default administrative connection database
rdsadmin | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rdsadmin=CTc/rdsadmin | No Access | pg_default |
template0 | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/rdsadmin +| 7909 kB | pg_default | unmodifiable empty database
| | | | | rdsadmin=CTc/rdsadmin | | |
(4 rows)
如果我在 psql 中创建新数据库,我可以在 pgadmin 中看到它,例如
postgres=> CREATE DATABASE testdb TEMPLATE anchor_reporting;
CREATE DATABASE
postgres=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
------------------+-----------------+----------+-------------+-------------+-------------------------------------
anchor_reporting | reporting_admin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/reporting_admin +
| | | | | reporting_admin=CTc/reporting_admin
postgres | reporting_admin | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
rdsadmin | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | rdsadmin=CTc/rdsadmin
template0 | rdsadmin | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/rdsadmin +
| | | | | rdsadmin=CTc/rdsadmin
testdb | reporting_admin | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
(5 rows)
来自 PGAdmin4 的观点 来自 RDS 的 pgAdmin 数据库列表
请参阅下面的 PGAdmin4 版本信息:
Version
4.8
Copyright
Copyright (C) 2013 - 2019, The pgAdmin Development Team
Python Version
3.7.3 (default, Apr 16 2019, 14:55:10) [Clang 10.0.1 (clang-1001.0.46.3)]
Flask Version
1.0.2
Application Mode
Desktop
Current User
[email protected]
对于为什么会发生这种情况有什么想法吗?