From: | Joseph Brenner <doomvox(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Select works only when connected from login postgres |
Date: | 2016-12-04 17:14:58 |
Message-ID: | CAFfgvXWrQCcK5kRAUcDsT6LuDQJKg=TB5f_9wHMp_b3L36j55Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Yeah, I get the sense I need to simplify the situation, if only to
eliminate some distractions from the story.
This morning I was thinking I want to play around with pg_hba.conf
settings some more, but after that I'll do some pg_dumps and
uninstalls and see how things behave.
Oh, trying:
/usr/bin/psql --dbname=doom --username=doom -p 543x
As login 'doom' the connection happens only for port 5432,
as login 'postgres' the connection fails differently for port 5432:
psql: FATAL: Peer authentication failed for user "doom"
(Like I said, I need to play with pg_hba.conf a bit.)
But that actually surprises me, I would've expected it'd be on
port 5434, because that's the most recent binary install, not the
original 9.4 version:
/usr/bin/psql -V
psql (PostgreSQL) 9.6.1
/etc/postgresql/9.6/main/postgresql.conf
port = 5434 # (change requires restart)
/etc/postgresql/9.4/main/postgresql.conf
port = 5432 # (change requires restart)
On Sun, Dec 4, 2016 at 7:06 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
> On 12/03/2016 09:38 PM, Joseph Brenner wrote:
>>>
>>> So is the 9.4 instance the production/live database?
>>
>>
>> Essentially, but it's not heavily used: this is me messing around on a dev
>> box.
>>
>>> So what happens when you specify the port in your psql connection, eg:
>>> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5432
>>> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5433
>>> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5434
>>
>>
>> With /usr/local/pgsql/bin/psql, only "-p 5433" connects, the
>> other two complain like so:
>>
>> psql: could not connect to server: No such file or directory
>> Is the server running locally and accepting
>> connections on Unix domain socket "/tmp/.s.PGSQL.5434"?
>>
>
> Alright how about?:
>
> /usr/bin/psql --dbname=doom --username=doom -p 5434
>
> My suspicion is that when you did the source build you got some cross
> contamination of libraries.
>
> If it where me I would get rid of the instance that you built from source,
> assuming that there is nothing important on it.
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-12-04 17:31:40 | Re: Select works only when connected from login postgres |
Previous Message | Gmail | 2016-12-04 16:52:45 | Re: INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-12-04 17:31:40 | Re: Select works only when connected from login postgres |
Previous Message | Pavel Stehule | 2016-12-04 16:55:11 | Re: PSQL commands: \quit_if, \quit_unless |