pgbouncer with ldap

2019-09-09 Thread Ayub M
Hello, I am trying to setup pgbouncer with ldap to connect with rds postgres. Downloaded latest version of pbbouncer (1.11) and using hba auth_type. Getting below error when starting pgbouncer daemon. Am I missing something? [centos@ip-x.x.x.x etc]$ pgbouncer -V PgBouncer version 1.11.0 [centos@i

Re: pgbouncer with ldap

2019-09-09 Thread Christoph Moench-Tegeder
## Ayub M (hia...@gmail.com): > Hello, I am trying to setup pgbouncer with ldap to connect with rds > postgres. Downloaded latest version of pbbouncer (1.11) and using hba > auth_type. Getting below error when starting pgbouncer daemon. Am I > missing something? There's no "ldap" mentioned anywhe

Re: PG11.2 - wal_level =minimal max_wal_senders = 0

2019-09-09 Thread Luca Ferrari
On Sat, Sep 7, 2019 at 2:15 AM Jason Ralph wrote: > I currently have the systems running a parallel pg_dump each night to a > separate partition mounted on the VM. Then I perform a full backup of the VM > and all mounted drives each night. Would this be affected by disabling wal > archiving? I

Re: pgbouncer with ldap

2019-09-09 Thread Christoph Moench-Tegeder
## Ayub M (hia...@gmail.com): > It has hba and via hba file one can specify ldap connections > > https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html https://pgbouncer.github.io/config.html#hba-file-format "Auth-method field: Only methods supported by PgBouncer’s auth_type are supported", a

Re: pgbouncer with ldap

2019-09-09 Thread Ayub M
It has hba and via hba file one can specify ldap connections https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html On Mon, Sep 9, 2019, 3:40 AM Christoph Moench-Tegeder wrote: > ## Ayub M (hia...@gmail.com): > > > Hello, I am trying to setup pgbouncer with ldap to connect with rds > > postg

Re: pgbouncer with ldap

2019-09-09 Thread Laurenz Albe
Christoph Moench-Tegeder wrote: > > It has hba and via hba file one can specify ldap connections > > > > https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html > > https://pgbouncer.github.io/config.html#hba-file-format > "Auth-method field: Only methods supported by PgBouncer’s auth_type > ar

Re: floating point output

2019-09-09 Thread Peter J. Holzer
On 2019-09-09 01:03:06 -0400, Tom Lane wrote: > Rob Sargent writes: > > Below I show a floating point column from a recent query. > > > Here's my guess at what's happening in the formatting: > > 1) scientific notation if smaller than 1.0e-04 (I’m not in the > > very-much-larger-than-one worl

Re: pgbouncer with ldap

2019-09-09 Thread Achilleas Mantzios
On 9/9/19 12:41 μ.μ., Laurenz Albe wrote: Christoph Moench-Tegeder wrote: It has hba and via hba file one can specify ldap connections https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html https://pgbouncer.github.io/config.html#hba-file-format "Auth-method field: Only methods supported by

Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 from http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main). Today I noticed that I couldn't invoke psql as an unprivileged user anymore: % psql Error: Invalid data directory for cluster 11 main Further investigation showed th

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Daniel Verite
Peter J. Holzer wrote: > 2) Why does psql need to read postgresql.conf, and more specifically, > why does it care about the location of the data directory? It > shouldn't access files directly, just talk to the server via the > socket. It's not psql itself, it's pg_wrapper. $ ls -l

database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi All, The DB is already there and getting the error of the DB does not exist where I execute it via shell. DBLIST=/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d postgres -q -t -c "SELECT datname from pg_database where datname in ('CDF_100_1313')"/usr/lib/postgresql/11/bin/psql -p 5432 -U

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Karsten Hilbert
On Mon, Sep 09, 2019 at 05:16:20PM +0530, nikhil raj wrote: > > The DB is already there and getting the error of the DB does not exist > where I execute it via shell. > DBLIST=/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d postgres -q > -t -c "SELECT datname from pg_database where datname

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi Karsten, yup you are right can you help in i tried by removing quotion and also adding extra having same issue. On Mon, Sep 9, 2019 at 5:25 PM Karsten Hilbert wrote: > On Mon, Sep 09, 2019 at 05:16:20PM +0530, nikhil raj wrote: > > > > > The DB is already there and getting the error of the D

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi Dan, Still facing the same issue. /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT CONNECT ON DATABASE $DBLIST TO cpupdate" ERROR: database "cdf_100_1313" does not exist On Mon, Sep 9, 2019 at 6:38 PM Dan Livingston wrote: > > I think you need to add parens around

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Dan Livingston
I think you need to add parens around the command to populate DBLIST and remove the quotes in the GRANT command. In bash this works for me: DBLIST=$(/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d postgres -q -t -c "SELECT datname from pg_database where datname in ('tempdb')") /usr/lib/po

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi Rob, Please find the out put. Name | Owner | Encoding | Collate |Ctype| Access privileges --+--+--+-+-+--- CDF_10_11 | cpuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 | cpuser=CT

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Rob Sargent
> On Sep 9, 2019, at 7:16 AM, nikhil raj wrote: > > Hi Dan, > > Still facing the same issue. > > /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT > CONNECT ON DATABASE $DBLIST TO cpupdate" > ERROR: database "cdf_100_1313" does not exist > Can we see the output

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Tom Lane
"Peter J. Holzer" writes: > Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 from > http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main). > Today I noticed that I couldn't invoke psql as an unprivileged user > anymore: > % psql > Error: Invalid data directory for cluster 11

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Tom Lane
> On Sep 9, 2019, at 7:16 AM, nikhil raj wrote: >> /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT >> CONNECT ON DATABASE $DBLIST TO cpupdate" >> ERROR: database "cdf_100_1313" does not exist This still isn't quoted properly. It's tricky since double-quote is special t

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi All, just did few modification of the shell command still having the same issue. Having the issue with the Grant command only its not taking the parameters. /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT CONNECT ON DATABASE \"$DBLIST\" TO cpupdate" ERROR: database "

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Adrian Klaver
On 9/9/19 7:30 AM, nikhil raj wrote: Hi All, just did few modification of the shell command still having the same issue. Having the issue with the Grant command only its not taking the parameters.  /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT CONNECT ON DATABASE

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Daniel Verite
nikhil raj wrote: > /usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT > CONNECT ON DATABASE \"$DBLIST\" TO cpupdate" > ERROR: database " CDF_100_1313" does not exist That's because you don't use the unaligned format to get the list of results. You should add -A to

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
On 2019-09-09 13:29:38 +0200, Daniel Verite wrote: > Peter J. Holzer wrote: > > 2) Why does psql need to read postgresql.conf, and more specifically, > > why does it care about the location of the data directory? It > > shouldn't access files directly, just talk to the server via the > >

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread nikhil raj
Hi Adrian, DBLIST=/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d postgres -q -t -c "SELECT datname from pg_database where datname in ('CDF_100_1313')"/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT CONNECT ON DATABASE \"$DBLIST\" TO cpupdate" only in the grant its

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
On 2019-09-09 19:15:19 +0200, Peter J. Holzer wrote: > On 2019-09-09 10:03:57 -0400, Tom Lane wrote: > > "Peter J. Holzer" writes: > > > Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 > > > from http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main). > > > Today I noticed th

Issues with inconsistent COLLATION installation

2019-09-09 Thread Cory Nemelka
We are having issues with some databases getting our locales generated. We are using Ubuntu 18.04 and postgresql 10.8. Example: *from bash prompt:* $ locale -a | egrep fr fr_BE fr_BE@euro fr_BE.iso88591 fr_BE.iso885915@euro fr_BE.utf8 fr_CA fr_CA.iso88591 fr_CA.utf8 fr_CH fr_CH.iso88591 fr_CH.u

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Cory Nemelka
We have already run pg_import_system_collations('pg_catalog') --cnemelka On Mon, Sep 9, 2019 at 12:43 PM Cory Nemelka wrote: > We are having issues with some databases getting our locales generated. > We are using Ubuntu 18.04 and postgresql 10.8. > > Example: > > *from bash prompt:* > > $ loca

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Cory Nemelka
Here is encoding for existing database: List of databases ┌───┬──┬──┬─┬─┬───┐ │ Name│ Owner │ Encoding │ Collate │Ctype│ Access privileges │ ├───┼──┼───

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Tom Lane
Cory Nemelka writes: > Here is encoding for existing database: > List of databases > ┌───┬──┬──┬─┬─┬───┐ > │ Name│ Owner │ Encoding │ Collate │Ctype│ Access > privileges │

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Daniel Verite
Cory Nemelka wrote: > ERROR: 22023: could not create locale "fr_FR.utf8": No such file or > directory > DETAIL: The operating system could not find any locale data for the locale > name "fr_FR.utf8". > LOCATION: report_newlocale_failure, pg_locale.c:1312 I can reproduce this by creatin

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Tom Lane
"Daniel Verite" writes: > I can reproduce this by creating a new locale *after* starting > PostgreSQL and trying to use it before a restart. That is interesting. I think it must mean that glibc's setlocale() and newlocale() maintain some kind of internal cache about available locales ... and the

Re: Issues with inconsistent COLLATION installation

2019-09-09 Thread Cory Nemelka
Thank you :) I'll try restarting postgresql during our next maintenance window and report back. --cnemelka On Mon, Sep 9, 2019 at 3:08 PM Tom Lane wrote: > "Daniel Verite" writes: > > I can reproduce this by creating a new locale *after* starting > > PostgreSQL and trying to use it before a re

Re: pgbouncer with ldap

2019-09-09 Thread Ayub M
Thank you Achilleas and Laurenz for the points, will try this out. On Mon, Sep 9, 2019, 6:46 AM Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > On 9/9/19 12:41 μ.μ., Laurenz Albe wrote: > > Christoph Moench-Tegeder wrote: > >>> It has hba and via hba file one can specify ldap connecti

RE: database "cdf_100_1313" does not exist

2019-09-09 Thread Klint Gore
From: nikhil raj [mailto:nikhilraj...@gmail.com] Sent: Tuesday, 10 September 2019 12:39 AM To: Adrian Klaver Cc: Tom Lane; Rob Sargent; Dan Livingston; Karsten Hilbert; pgsql-general@lists.postgresql.org Subject: Re: database "cdf_100_1313" does not exist > DBLIST=/usr/lib/postgresql/11/bin/psql