0

我正在尝试使用 pg_agent 创建一个任务作业。我创建了一个新的工作、计划和步骤。它们都已启用。在我的步骤中,我有这样一个查询要运行:

DELETE FROM "ID: 889197824 CH: 0006 Messdaten" t  
   USING (
   SELECT "Zeit" FROM "ID: 889197824 CH: 0006 Messdaten" WHERE "Zeit" < ts2oadate(now() - (interval '3 Months'))
   ) d  
LEFT   JOIN ( 
   SELECT min("Zeit") AS "Zeit" 
   FROM   "ID: 889197824 CH: 0006 Messdaten" 
   WHERE  "Zeit" < ts2oadate(now() - (interval '3 Months')) 
   GROUP  BY date_trunc('hours',oadate2ts("Zeit")) 

   ) x USING ("Zeit") 
WHERE  x."Zeit" IS NULL 
AND    d."Zeit" = t."Zeit";

检查pg_agent服务的事件查看器后,我发现了这样一个错误:

Failed to create new connection for connection string 'user=postgres host=localhost port=5432 dbname=test_db':fe_sendauth: no password supplied

这是 pgpass.conf

localhost:5432:postgres:postgres:xxxx

你知道会有什么问题吗?

更多信息:

这是工作

在此处输入图像描述

这是时间表

在此处输入图像描述

这是一步

在此处输入图像描述

4

1 回答 1

2

I actually solved the problem by changing the pgpass.conf in the path:

postgres\AppData\Roaming\postgresql

to

localhost:5432:*:postgres:xxx

Before I was trying to change the wrong pgpass.conf which is in the path:

pcUser\AppData\Roaming\postgresql

I hope, it helps someone else

于 2013-05-22T14:58:41.893 回答