我使用名为 postgres 的本地计算机帐户安装了带有 Windows 服务的 pgAgent。我已确认 Windows 服务运行正常。我在 pgAdmin 中创建了一个作业,应该从我的客户数据库中的表中删除某些记录。作业中的唯一步骤是配置到客户数据库的本地连接类型。问题是,作业每次都失败,并在 Windows 事件日志中写入以下警告:
Failed to create new connection to database 'customer':'fe_sendauth: no password supplied'
我已经验证在 C:\Users\postgres\AppData\Roaming\postgresql 中有一个 pgpass.conf 文件。以下是它的内容:
localhost:5432:postgres:postgres:<password_redacted>
我不确定还能尝试什么。我无法找到有关此错误消息的任何进一步信息,因为它适用于 pgAgent。
版本信息:
- PostgreSQL 9.2.4,由 Visual C++ build 1600 编译,64 位
- pgAdmin 1.16.1
- pgAgent v3.3.0-1
Windows服务启动信息:
C:\Program Files (x86)\pgAgent\bin\pgagent.exe RUN pgAgent host=localhost port=5432 user=postgres dbname=postgres
pg_hba.conf 的非注释内容:
host all all 127.0.0.1/32 md5
host all all ::1/128 md5