Re: error on connecting port 5432 - Mailing list pgsql-general

From Atul Kumar
Subject Re: error on connecting port 5432
Date
Msg-id CA+ONtZ6MP_EmnFtHMV+MKE_+OY=-dMeuwie8j8OyAgrrYzeJ1A@mail.gmail.com
Whole thread Raw
In response to Re: error on connecting port 5432  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: error on connecting port 5432  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
hi,

There is no directory of postgresql in /var/run.

Please help me out.



Regards,
Atul




On 12/1/20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Atul Kumar <akumar14871@gmail.com> writes:
>> Just to clarify that I am at root OS user, trying to create a test user
>> using postgres user(-u) with create user command.
>
> Given the reference to /var/run/postgresql, I'm suspecting that you
> are running a server that thinks it should put its socket in /tmp,
> but you have some copies of libpq on the machine that were built with
> default socket location /var/run/postgresql.  When you are root, you
> are very likely using a different PATH that is finding a different
> createuser program linked to a different libpq.so than when you are
> not root.
>
> A possible workaround is to add "-h /tmp" to your command when
> running as root.  Eventually you'd want to try to not have
> multiple postgres installations on the machine.
>
>             regards, tom lane
>



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: error on connecting port 5432
Next
From: "David G. Johnston"
Date:
Subject: Re: error on connecting port 5432