请帮助我.. 我有一些关于 pgAgent 的问题。
[环境]
DB : PostgreSQL 9.3
OS : Window 7
OS login ID : someid@mail.com
pgAdmin login ID : postgres
pgAgent user : postgres
pgAgent schema belongs to: postgres DB
DB that I'll treat : testDB (In Step configuration, I specified 'testDB' as Database.
Connection type is 'local'. Connection string is empty.)
DB server : local machine (my laptop computer)
我安排了 pgAgent 作业,但它无法连接数据库。
输出消息(pgAdmin>统计)
[Warning] Couldn't get a connection to the database (pgAgent)
(什么数据库?有2个数据库。'postgres'和'testDB'。我会处理'testDB'。然后无法连接到哪个数据库?)
窗口事件查看器
Failed to create new connection to database 'testDB':'fe_sendauth: no password supplied'
我的 pgpass.conf
localhost:5432:postgres:postgres:[pgAdmin password for postgres]
localhost:5432:testDB:postgres:[pgAdmin password for postgres]
我的 pg_hba.conf
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 @authmethodhost@
# Allow replication connections from localhost, by a user with the
# replication privilege.
@remove-line-for-nolocal@#local replication @default_username@ @authmethodlocal@
#host replication @default_username@ 127.0.0.1/32 @authmethodhost@
#host replication @default_username@ ::1/128 @authmethodhost@
我的 pgAgent 命令选项(Service>pgAgent>Property>General 选项卡)
C:\Program Files (x86)\pgAgent\bin\pgagent.exe RUN pgAgent host=localhost port=5432 user=postgres dbname=postgres
pgAgent 服务登录 ID(服务>pgAgent>属性>登录选项卡)
id : someid@mail.com
pwd : [ someid@mail.com's password ]
[结论]
对于我所知道的任何事情,pgpass.conf 中的密码设置似乎都是错误的。还是pg_hba.conf 或者Services>pgAgent>Logon中的logon ID 其实..我真的不明白怎么回事。^^
提前感谢您的帮助^^