Re: Select works only when connected from login postgres - Mailing list pgsql-general

From Tom Lane
Subject Re: Select works only when connected from login postgres
Date
Msg-id 9621.1480812695@sss.pgh.pa.us
Whole thread Raw
In response to Select works only when connected from login postgres  (Joseph Brenner <doomvox@gmail.com>)
Responses Re: Select works only when connected from login postgres
List pgsql-general
Joseph Brenner <doomvox@gmail.com> writes:
> I'm trying to get a new build of 9.6.1 working on Debian
> stable and I'm seeing some odd behavior where things work
> correctly if I run psql when logged in as user 'postgres',
> but if I'm logged-in as user 'doom' (my usual login), I don't
> seem to have any select privileges.  Even this fails
> silently:

>   select 'world' as hello;

Um, define "fails silently"?  Do you get a command prompt from
psql?  What does the interaction look like *exactly*?  If psql
just returns to the shell command prompt, maybe it's giving a
nonzero exit code? (try "echo $?" afterwards)

[ and later... ]

> The only thing unusual about the steps that I followed was I built
> with port 5433 (rather than 5432) as the default,

This is not as simple as it might look; the default port is actually
wired into libpq.so, not psql itself.  And on most brands of Linuxen,
it's not that easy to get a program to link to a non-default copy of
a shared library if there's a copy in /usr/lib.  However, if you were
connecting to the wrong port number, I'd still not expect that it
just dies without saying anything.

Hmm ... a different take on that is that maybe psql is crashing
because it's linking to an ABI-incompatible libpq.  You should try
"ldd" on the psql executable and see if it's resolving the libpq
dependency to the copy you intended.

            regards, tom lane


pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: No select privileges when not connecting from login postgres
Next
From: Gmail
Date:
Subject: Re: Postrgres-XL and Postgres-BDR