Re: error on connecting port 5432

From: Andreas Schmitz <mailinglist(at)longimanus(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: error on connecting port 5432
Date: 2020-12-02 07:09:29
Message-ID: cd513033-929e-781d-6449-5446100017e1@longimanus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You might want to give
https://www.postgresql.org/docs/13/runtime-config-connection.html a read

regards

Andreas

Am 12/2/2020 um 8:02 AM schrieb Atul Kumar:
> Thanks a lot Tom, I appended the -h /tmp and it worked.
>
> I need just one more help from you.
>
> Could you tell me that why & how that socket file existed in /tmp directory.
>
> What is the practice to make sure that this file (.s.PGSQL.5432)
> should be inside /var/run directory ? so that it will not throw such
> error.
>
> Please help me.
>
>
>
>
>
>
> Regards,
> Atul
>
>
>
> On 12/1/20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Atul Kumar <akumar14871(at)gmail(dot)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
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-12-02 07:20:27 Re: error on connecting port 5432
Previous Message Atul Kumar 2020-12-02 07:02:11 Re: error on connecting port 5432