Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread Stéphane Dunand


Le 29/05/2018 à 21:14, nageswara Bandla a écrit :


The intention of this post is to find out ways to run pgagent without 
passing password in its connection string.


*Windows:*

I have installed pgagent on windows and configured to run under Local 
System account.


Command:-

C:\PostgreSQL\bigsql\pgagent\bin\pgagent.exeINSTALL pgagent -l 2 -u 
LocalSystem hostaddr=127.0.0.1 dbname=postgresdb user=postgres


I have logged into my windows account; where my profile has 
pgpass.conf in %APPDATA%/postgresql/pgpass.conf file.


127.0.0.1:5432:*:postgres:postgres1

Pgagent is not started and throws error –“The pgagent service on Local 
Computer started and then stopped. Some services stop automatically if 
they are not in use by other services or programs”.


Eventvwr log messages have these error messages - “Couldn't create the 
primary connection (attempt 10): fe_sendauth: no password supplied”


*PGPASSFILE env variable:*

As per the link- 
(https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html) I set 
PGPASSFILE environment variable to point to pgpass.conf location. Even 
then, it’s throwing same above error message. I have found out that 
pgagent is not reading pgpass.conf file when configured under 
LocalSystem account.


When I change the properties of the pgagent service to run under my 
login user account. Then, it’s reading pgpass.conf file under 
%APPDATA%/postgresql/pgpass.conf.


try without "-u LocalSystem", without PGPASSFILE env variable and with 
your login account plus your %APPDATA%/postgresql/pgpass.conf file



I am clueless, why pgagent is not honoring PGPASSFILE env variable.

*Linux:*

In Linux, I have installed pgagent_96 using yum command. And tried to 
run pgagent using command /etc/init.d/pgagent_96 from postgres user 
account.


It fails with error message – “WARNING: Couldn't create the primary 
connection (attempt 2): fe_sendauth: no password supplied”


I made sure that I have .pgpass configuration file with 0600 
permissions in postgres user home directory.


I have tried by defining PGPASSFILE env variable in postgres user 
account. But it’s not working.


Pgagent is starting only when we pass password in it’s connection 
string. But which is not a good practice at all.



in your /etc/init.d/pgagent_96 file, verify that the user starting the 
command "pgagent ..." is postgres in your case.


Stéphane Dunand



Re: Request for information about postgres version 15.2 stability

2023-04-19 Thread Stéphane Dunand



Le 18/04/2023 à 08:56, gayathri ramesh a écrit :

Hi Team,

Our company is currently supporting around 100+ postgres databases and 
we are planning to upgrade to version 15.2. We want to ensure that 
there are no major critical bugs that could impact our production systems.


I would appreciate if you could provide us with information about the 
stability of postgres version 15.2. We are particularly interested in 
knowing if there are any known critical bugs or issues that could 
potentially impact the system.


Thanks in advance. looking forward to hearing from you.

Best Regards.

a great summary of what was done
https://why-upgrade.depesz.com/show?from=10.23&to=15.2&keywords=




Re: PgAgent on Windows

2018-11-06 Thread Stéphane Dunand

Le 06/11/2018 à 14:36, Marcio Meneguzzi a écrit :

Hello,

I´m trying use pgAgent on windows 10 and Windows Server 2012 R2.
My version of PostgreSQL is 9.5.1.14
Install and configure pgAgent with sucess, but, when I try run a Job, 
status is Failed with a message bellow:
*"Couldn't create the primary connection (attempt 1): fe_sendauth: no 
password supplied"

*

My %APPDATA%\postgresql\pg_pass.conf is:
localhost:5490:*:postgres:my_pass

Please, any help?

Thank´s,
Márcio


Mailtrack 
 
	Remetente notificado por
Mailtrack 
 
06/11/18 11:36:31 	



Hello,

check
1) the user account who launch pgagent service. %appdata% is relative to 
this user

2) pg_pass.conf must be in folder %appdata%\roaming\postgresql
3) host parameter in pgagent service command line must match hostname in 
pg_pass.conf


Stéphane