From: Tom Lane <tgl@sss.pgh.pa.us>
To: Atul Kumar <akumar14871@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: error on connecting port 5432
Date: Tue, 01 Dec 2020 11:53:55 -0500
Message-ID: <1399058.1606841635@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+ONtZ4AgtE1w+mSWb8h_r_fyoC3wj05Fd3czC136zU+6Y1V5Q@mail.gmail.com>
References: <CA+ONtZ7KAKbePMZ08ifi=QvugZ+-XOK6mSwWkg1bgDm8gsmMFQ@mail.gmail.com>
<CA+ONtZ5tGvDy+UJdiW=ZiWOLW9aJo9-hK1b6SHjGwr1r5sGUkg@mail.gmail.com>
<2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com>
<CA+ONtZ4AgtE1w+mSWb8h_r_fyoC3wj05Fd3czC136zU+6Y1V5Q@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, akumar14871@gmail.com, adrian.klaver@aklaver.com
Subject: Re: error on connecting port 5432
In-Reply-To: <1399058.1606841635@sss.pgh.pa.us>
References: <CA+ONtZ7KAKbePMZ08ifi=QvugZ+-XOK6mSwWkg1bgDm8gsmMFQ@mail.gmail.com> <CA+ONtZ5tGvDy+UJdiW=ZiWOLW9aJo9-hK1b6SHjGwr1r5sGUkg@mail.gmail.com> <2e7b686b-7f1a-d5f9-75d8-c7a754798789@aklaver.com> <CA+ONtZ4AgtE1w+mSWb8h_r_fyoC3wj05Fd3czC136zU+6Y1V5Q@mail.gmail.com> <1399058.1606841635@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox