After seeing your email, I have verified another time now. It is a RDS endpoint.
I see that host naming convention followed correct. Case sensitivity is not an issue.
Yes, N28068 is the user. At this time, I am running the script manually. My plan is to schedule the script thru a job and the owner is going to be N28068 .
Thanks,
Sarwar
From: Erik Wienhold <ewie@ewie.name> Sent: Sunday, October 22, 2023 7:19 PM To: M Sarwar <sarwarmd02@outlook.com> Cc: Ron <ronljohnsonjr@gmail.com>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org> Subject: Re: Need to run pg_dump from the laptop without entering the password
On 2023-10-23 00:31 +0200, M Sarwar wrote: > Now Error Message:- "pg_dump: error: connection to database "ngbrpesb" failed: fe_sendauth: no password supplied"
Could be that the hostname in pgpass.conf does not match the hostname in the connection parameters. The hostname in pgpass.conf is case-sensitive (not mentioned in the docs), so it must match the exact spelling as in the connection parameters.
Path #3 should be the correct one if user N28068 runs pg_dump. You also wrote that you want to schedule the execution of pg_dump. Does the scheduled job also run as that user?