Re: error on connecting port 5432

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Atul Kumar <akumar14871(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: error on connecting port 5432
Date: 2020-12-02 07:20:27
Message-ID: CAKFQuwbW64C+q=2FPv8Ey6nBsG51Dx3b2Qw62egLRPy1PQp4qA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, December 2, 2020, Atul Kumar <akumar14871(at)gmail(dot)com> wrote:

> 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.
>

Because the server was configured that way:

https://www.postgresql.org/docs/current/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS

See: unix_socket_directories

Thing is, the client code doesn’t read the postgresql.conf configuration
file - it just knows its own compile-time default. For some reason, your
client in one mode was compiled using a different default than the server
on the same machine. From which we infer you have two client installs on
your machine, each compiled using different defaults.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Levente Birta 2020-12-02 08:36:28 pg_cron question
Previous Message Andreas Schmitz 2020-12-02 07:09:29 Re: error on connecting port 5432