Re: [Pgbouncer-general] Again, problem with pgbouncer

From: Wolf Schwurack <wolf(at)uen(dot)org>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: raghu ram <raghuchennuru(at)gmail(dot)com>, "pgbouncer-general(at)pgfoundry(dot)org" <pgbouncer-general(at)pgfoundry(dot)org>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: [Pgbouncer-general] Again, problem with pgbouncer
Date: 2012-10-05 16:01:36
Message-ID: 485368C10B2A274EABE47136B8AFCA123427C609@X-MB11.xds.umail.utah.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-- OK, but this is not a showstopper here. Right?
Your right - just a thought

-- What settings do I need to give "/var/log" (currently root) so the pgbouncer process can write to it? Why are these special permissions needed
You need to have a pgbouner directory in /var/log and have the owner pgbouncer. This is easy to test try creating a file in /var/log as the user pgbouncer. It should fail because pgbouncer does not have writer permissions to /var/log. As root create a directory /var/log/pgbouncer, change owner to pgbouncer. Set your parameter for pgbouncer.log to /var/log/pgbouncer. Then test by creating a file in /var/log/pgbouncer as user pgbouncer

If the user exists in the postgres then I'm not sure why it fails.

Wolf

-----Original Message-----
From: Phoenix Kiula [mailto:phoenix(dot)kiula(at)gmail(dot)com]
Sent: Friday, October 05, 2012 9:37 AM
To: Wolf Schwurack
Cc: raghu ram; pgbouncer-general(at)pgfoundry(dot)org; PG-General Mailing List
Subject: Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

On Thu, Oct 4, 2012 at 2:50 AM, Wolf Schwurack <wolf(at)uen(dot)org> wrote:
> I use pgpool but some of the problem you listed are same as I had with
> pgpool

Thanks Wolf, for the thoughts.

> I would not run pgbouner in /var/run/pbbouner. Every time you reboot
> the directory will get deleted. I set my parameter to another
> directory the would not get deleted after a reboot.

OK, but this is not a showstopper here. Right?

> /var/log/pgbouncer.log:
> what is the permission on /var/log? If you don't have write permission on the directory then you cannot write to the file.

Permissions:

/var/run/pgbouncer --
70058074 drwxr-xr-x 2 pgbouncer postgres 4.0K Oct 2 06:17 pgbouncer/

/var/log --
145686529 drwxr-xr-x 17 root root 4.0K Oct 5 04:29 log/

Please note that whatever the settings, they were working before a server reboot. What settings do I need to give "/var/log" (currently
root) so the pgbouncer process can write to it? Why are these special permissions needed-- I mean Apache, MysQL, Nginx etc...all of them can write to the logs in this log folder.

> Psql: ERROR: No such user:
> You have to create the user in postgres, check you users
>
> postgres=# /du
>

Yes, this user exists in the postgres database.

List of roles
Role name | Attributes | Member of
-----------------+-----------------------------------+-----------
postgres | Superuser, Create role, Create DB | {}
rvadmin | | {}
MYSITE | | {}
MYSITE_MYSITE | Superuser, Create DB | {}

And the authfile also has permissions for "pgbouncer:postgres".

What else?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leonardo M. Ramé 2012-10-05 20:51:37 pg_dump problem
Previous Message Moshe Jacobson 2012-10-05 15:40:27 Re: Re: What's faster? BEGIN ... EXCEPTION or CREATE TEMP TABLE IF NOT EXISTS?