Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Adrian Klaver
On 04/11/2018 05:36 PM, Jonathan Leroy - Inikup wrote: 2018-04-12 1:49 GMT+02:00 Jonathan Leroy - Inikup : Maybe I will try to "dissect" pg_wrapper to find where the error occurs, but the script is quite complex... OK, I've found the issue : pg_wrapper is trying to get the value of the "data_d

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Jonathan Leroy - Inikup
2018-04-12 1:49 GMT+02:00 Jonathan Leroy - Inikup : > Maybe I will try to "dissect" pg_wrapper to find where the error > occurs, but the script is quite complex... OK, I've found the issue : pg_wrapper is trying to get the value of the "data_directory" setting by reading the postgresql.conf file.

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Adrian Klaver
On 04/11/2018 04:49 PM, Jonathan Leroy - Inikup wrote: 2018-04-12 1:38 GMT+02:00 Adrian Klaver : Another thought do you have the PGDATA environment variable set for your user1? Nope. Maybe I will try to "dissect" pg_wrapper to find where the error occurs, but the script is quite complex...

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Adrian Klaver
On 04/11/2018 04:49 PM, Jonathan Leroy - Inikup wrote: 2018-04-12 1:38 GMT+02:00 Adrian Klaver : Another thought do you have the PGDATA environment variable set for your user1? Nope. Maybe I will try to "dissect" pg_wrapper to find where the error occurs, but the script is quite complex...

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Jonathan Leroy - Inikup
2018-04-12 1:38 GMT+02:00 Adrian Klaver : > Another thought do you have the PGDATA environment variable set for your > user1? Nope. Maybe I will try to "dissect" pg_wrapper to find where the error occurs, but the script is quite complex... -- Jonathan Leroy

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Jonathan Leroy - Inikup
2018-04-12 1:32 GMT+02:00 Adrian Klaver : > What are the permissions on /usr/bin/psql? > > On my Ubuntu 16.04 instance I have: > > lrwxrwxrwx 1 root root 37 Feb 8 04:55 /usr/bin/psql -> > ../share/postgresql-common/pg_wrapper* I have exactly the same permissions on my side. I don't think it's a p

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Adrian Klaver
On 04/11/2018 04:20 PM, Jonathan Leroy - Inikup wrote: 2018-04-12 0:26 GMT+02:00 Tim Cross : Check your settings in /etc/postgresql-common/user_clusters. The wrapper script uses that file to determine what databases to connect to or what is the user default database cluster. It can also be overr

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Adrian Klaver
On 04/11/2018 04:20 PM, Jonathan Leroy - Inikup wrote: 2018-04-12 0:26 GMT+02:00 Tim Cross : Check your settings in /etc/postgresql-common/user_clusters. The wrapper script uses that file to determine what databases to connect to or what is the user default database cluster. It can also be overr

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Jonathan Leroy - Inikup
2018-04-12 0:26 GMT+02:00 Tim Cross : > Check your settings in /etc/postgresql-common/user_clusters. The wrapper > script uses that file to determine what databases to connect to or what > is the user default database cluster. It can also be overridden with a > local ~/.postgresqlrc, so check there

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Tim Cross
Jonathan Leroy - Inikup writes: > Hi, > > I'm using multiples versions of PostgreSQL from the postgresql.org > repository (http://apt.postgresql.org/) on Debian Jessie, on multiples > servers. > Each postgresql-client-XX package depends on postgresql-client-common, > which provides the pg_wrappe

Re: Commands linked to pg_wrapper not working with non-root users

2018-04-11 Thread Tom Lane
Jonathan Leroy - Inikup writes: > Here's my issue : when I'm logged as an user which is not root or > postgresql, I can't use any of the commands linked to pg_wrapper: > user1@server1:~ $ /usr/bin/psql --version > Error: Invalid data directory There's no error message with exactly that spelling