Re: Select works only when connected from login postgres
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Brenner <doomvox@gmail.com>
Cc: pgsql-general@postgresql.org
Date: 2016-12-04T00:51:35Z
Lists: pgsql-hackers, 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
Commits
-
Handle empty or all-blank PAGER setting more sanely in psql.
- 1ec5cc025b41 9.2.20 landed
- ccb84dae13c9 9.4.11 landed
- bb39f58f76b4 9.6.2 landed
- 82eb5c514473 9.3.16 landed
- 370c7a863aa7 9.5.6 landed
- 18f8f784cbbf 10.0 landed