-1

I'm trying to schedule a job using pgAgent in postgresql. pgAgent is working fine with the postgres database, but when i'm selecting the other database which i created. It is not working, the job is getting failed.

Can someone guide me in configuring it for another database also.

Thank You

GeekExplorer
  • 260
  • 2
  • 6
  • 23

2 Answers2

3
  1. Find your %AppData%\Roaming\postgresql\pgpass.conf file under the user whose credentials you have provided for the pgAgent installer. For my computer, it's C:\Users\postgres\AppData\Roaming\postgresql\pgpass.conf

  2. Change the line localhost:5432:postgres:postgres:password into localhost:5432:*:postgres:password (Format: HOST:PORT:DATABASE:USER:PASSWORD)

It works for me.

0x269
  • 688
  • 8
  • 20
0
  1. PgAgent --> Steps --> ConnectionType="Remote"
  2. PgAgent --> Steps --> Connection string : host=localhost port=5432 dbname=dataBaseName user=userName password=password

Will Work..!

Adem Şener
  • 71
  • 1
  • 2