我在红移集群上使用了pgbouncer。当我在Postgres上使用pgbouncer时,我可以使用psql -h localhost -p xxxx pgbouncer登录到pgbouncer实例。
但是,我如何登录到pgb强设置的红移呢?pgbouncer运行在ec2实例上,而reshift则由aws管理。
我尝试使用localhost (其中运行pgbouncer )和redshift端点访问psql。知道如何访问pgbouncer实例吗?这个实例是为redshift设置的?
[ec2-user@xxxx ~]$ psql -h localhost -p 5439 -U admin pgbouncer
psql: ERROR: not allowed
ERROR: not allowed
[ec2-user@xxxx pgbouncer]$ psql -h xxxxxxxx.us-east-2.redshift.amazonaws.com -p 5439 -U admin pgbouncer
Password for user admin:
psql: FATAL: database "pgbouncer" does not exist发布于 2018-12-02 07:48:14
您需要在redshift上创建pgbouncer数据库。
在创建redshift集群时,还创建了一个数据库(指定),您可以通过查看AWS控制台找到这一点。
然后,如果愿意,可以使用PSQL登录到该数据库。
psql -h xxxxxxxx.us-east-2.redshift.amazonaws.com -p 5439 -U admin your-redshift-db在那里您可以创建pgbouncer数据库。
create database pgbouncer;我建议您使用具有更多红移功能的pgbouncer。https://github.com/awslabs/pgbouncer-rr-patch
https://stackoverflow.com/questions/53577032
复制相似问题