From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Atul Kumar <akumar14871(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: IPV6 issue |
Date: | 2023-11-28 01:14:01 |
Message-ID: | 4a78e9e9-5d7f-4e7a-b3f4-0708161c1a1c@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/27/23 16:58, Atul Kumar wrote:
> I Don't know how postgres was installed,
1) Someone installed it. Ask around on where it came from.
2) Query the package manager to see if it was installed that way?
>
> How do I check if I have more than one version of psql installed ?
A quick and dirty way to see what you are using:
whereis psql
To find all the versions:
sudo find / -name psql
>
>
> Regards.
>
> On Tue, Nov 28, 2023 at 6:26 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 11/27/23 16:42, Atul Kumar wrote:
> > Hi,
> >
> > unix_socket_directories is set to default i.e. /tmp and I could
> see the
> > socket in /tmp directory.
>
> You have not answered:
>
> How did you install Postgres?
>
> Do you have more then one version of psql installed?
>
>
> Though I am pretty sure I know the answer to the second question.
>
>
> >
> >
> > Regards.
> >
> >
> >
> >
> > On Tue, Nov 28, 2023 at 2:11 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>> wrote:
> >
> > Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>
> > <mailto:adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>> writes:
> > > On 11/27/23 12:11, Atul Kumar wrote:
> > >> I found that localhost was set to .bash_profile and when I
> > removed it
> > >> and then re-attempted to connected the database using "psql
> > postgres", I
> > >> got this new error:
> > >>
> > >> psql postgres -p 5432
> > >> psql: error: could not connect to server: No such file or
> directory
> > >> Is the server running locally and accepting
> > >> connections on Unix domain socket
> > >> "/var/run/postgresql/.s.PGSQL.5432"?
> >
> > > Do you have more then one version of psql installed?
> >
> > Yeah, that. You're apparently using a version of psql/libpq that
> > thinks the default Unix socket location is /var/run/postgresql;
> > but the postmaster you are using did not create a socket there.
> > (Probably it put one in /tmp instead, which is the out-of-the-box
> > default location. But some distros consider that insecure so
> they
> > override it, typically to /var/run/postgresql/.)
> >
> > The easiest workaround if you have a mishmash of Postgres
> libraries
> > is to tell the postmaster to create sockets in both places.
> > See "unix_socket_directories" parameter.
> >
> > regards, tom lane
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | H | 2023-11-28 01:17:21 | Re: Installing extension temporal_tables for PG13 |
Previous Message | Atul Kumar | 2023-11-28 00:58:59 | Re: IPV6 issue |