From: | Joseph Brenner <doomvox(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: No select privileges when not connecting from login postgres |
Date: | 2016-12-03 22:49:45 |
Message-ID: | CAFfgvXXx+yxb3QS5cwK+5bmean45qfwcLo0JgTBFjwGDF6T=tQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Logged in as "doom", -V shows version 9.6.1 as I'd expect:
/usr/local/pgsql/bin/psql -V
psql (PostgreSQL) 9.6.1
To *literally* answer your question though, I have a different version
installed in my $PATH:
psql -V
psql (PostgreSQL) 9.4.9
But yes, I've been invoking psql the same way as login 'doom' or login
'postgres':
/usr/local/pgsql/bin/psql --dbname=doom --username=doom
On Sat, Dec 3, 2016 at 7:10 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
> On 11/30/2016 08:48 PM, Joseph Brenner wrote:
>>
>> I'm trying to get a new build of 9.6.1 working on a machine
>> running Debian stable (jessie) and I'm seeing some odd
>> behavior where things work correctly if I run psql when
>> logged in as postgres, but if I run it as user 'doom' (my
>> usual login), I don't seem to have any select privileges.
>> Even this fails silenlty:
>>
>> select 'world' as hello;
>>
>> But if run logged in as postgres, all is well:
>>
>> sudo su - postgres
>> /usr/local/pgsql/bin/psql --dbname=doom --username=doom
>> doom=# select 'world' as hello;
>> select 'world' as hello;
>> hello
>> -------
>> world
>> (1 row)
>>
>> Note that I'm talking about the unix logins, in both cases
>> the postgresql username/role is 'doom' (which has Superuser
>> privileges and is the owner of the 'doom' database).
>>
>> Looking at how the program files are installed, they're all
>> owned by 'root' with group 'staff':
>>
>> ls -la /usr/local/pgsql/bin/psql
>> -rwxr-xr-x 1 root staff 516824 Nov 26 23:20 /usr/local/pgsql/bin/psql
>>
>> So I added doom to the staff group and reloaded pg, but that
>> didn't help either. The files in the data tree are all
>> owned by postgres, but I don't think that's unusual:
>>
>> drwx------ 1 postgres postgres 42 Nov 26 16:14 base
>>
>> I'm running out of ideas for things to check. Any suggestions?
>
>
> When you are logged in as OS user 'doom', the case that is not working, what
> does:
>
> psql -V
>
> show?
>
> Is the psql connection the exact same as the one you show for the postgres
> OS user case?
>
>
>
>
>>
>>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Brenner | 2016-12-03 22:55:35 | Re: No select privileges when not connecting from login postgres |
Previous Message | Robert Inder | 2016-12-03 20:24:40 | Re: Moving pg_xlog |