Subject: pgbouncer socket directory

From: Peter Eisentraut <[email-masked]>
Date: Wed, 26 Apr 2017 08:47:16 -0400

The postgresql packages are configured with a socket directory
/var/run/postgresql, but pgbouncer is configured with /tmp.  Those
should probably be the same, so that clients can connect to either one.

But /var/run/postgresql is 0755 postgres:postgres, so pgbouncer can't
write there.  How is this supposed to work?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-pkg-yum mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum

---

From: Devrim Gündüz <[email-masked]>
Date: Thu, 27 Apr 2017 13:30:43 +0300

Hi Peter,

On Wed, 2017-04-26 at 08:47 -0400, Peter Eisentraut wrote:
> /var/run/postgresql, but pgbouncer is configured with /tmp. 

Hmm, I think I forgot to patch that part -- we create /var/run/pgbouncer, and
expect socket file there.

> Those  should probably be the same, so that clients can connect to either
> one.

I pass -h /tmp to psql to make this work. I see your point, though.

> write there.  How is this supposed to work?

No idea. Anyone else?

Regards,

-- 
Devrim Gündüz
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

---

From: Peter Eisentraut <[email-masked]>
Date: Thu, 27 Apr 2017 12:00:56 -0400

>> write there.  How is this supposed to work?

On Debian, there is no separate pgbouncer user and it runs as "postgres".

Alternatively, add pgbouncer to the postgres group and change the
permissions to 0775.

(Or just change them to 0777 and forget the rest.)

---

From: Devrim Gündüz <[email-masked]>
Date: Fri, 28 Apr 2017 13:59:27 +0300

Hi Peter,

> On Debian, there is no separate pgbouncer user and it runs as "postgres".

If my memory serves well, there was a community request about switching from
postgres to pgbouncer user in the past, and that was the reason why we switched
to that one.

> (Or just change them to 0777 and forget the rest.)

Will 0777 be secure?

Regards,

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 1 May 2017 12:28:37 -0400

>> (Or just change them to 0777 and forget the rest.)

That depends on what the security requirements are here.