Обсуждение: Can't find /var/lib/pgsql/9.3/data/global/pg_auth

Поиск
Список
Период
Сортировка

Can't find /var/lib/pgsql/9.3/data/global/pg_auth

От
Alexander Farber
Дата:
Hello,

on CentOS 6.4 I'm moving from 8.4 to 9.3, but can not find the file /var/lib/pgsql/9.3/data/global/pg_auth which I need for the pg_bouncer.

Does anybody please know where to find that file?

My packages:

postgresql93-9.3.1-1PGDG.rhel6.x86_64
pgdg-centos93-9.3-1.noarch
postgresql93-libs-9.3.1-1PGDG.rhel6.x86_64
postgresql93-server-9.3.1-1PGDG.rhel6.x86_64

My /etc/pgbouncer/pgbouncer.ini:

[databases]
balkan  = host=/tmp user=XXX password=XXX dbname=balkan
bukvy   = host=/tmp user=XXX password=XXX dbname=bukvy

[pgbouncer]
logfile = /var/log/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
listen_port = 6432
unix_socket_dir = /tmp

auth_type = md5
auth_file = /var/lib/pgsql/9.3/data/global/pg_auth

pool_mode = session
server_reset_query = DISCARD ALL

server_check_delay = 10

max_client_conn = 600
default_pool_size = 50

log_connections = 0
log_disconnections = 0
log_pooler_errors = 1

admin_users = postgres

My /var/lib/pgsql/9.3/data/pg_hba.conf:

local   all   all    md5

The psql connection w/o pgbouncer works well.

Thank you
Alex

Re: Can't find /var/lib/pgsql/9.3/data/global/pg_auth

От
Devrim GÜNDÜZ
Дата:
Hi,

On Wed, 2013-11-13 at 12:28 +0100, Alexander Farber wrote:
> Hello,
>
> on CentOS 6.4 I'm moving from 8.4 to 9.3, but can not find the file
> /var/lib/pgsql/9.3/data/global/pg_auth which I need for the pg_bouncer.
>
> Does anybody please know where to find that file?

It was removed about 4 years before. You can use mkauth.py to generate
the auth file. Here is a blog post about how to do it:

http://www.depesz.com/2010/12/04/auto-refreshing-password-file-for-pgbouncer/

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Вложения

Re: Can't find /var/lib/pgsql/9.3/data/global/pg_auth

От
Alexander Farber
Дата:
Thank you Devrim!

The "man 5 pgbouncer" is slightly outdated then,
it doesn't explain the auth_file format in detail:

       auth_file
           The name of the file to load user names and passwords from. The file format is the same as the PostgreSQL
           pg_auth/pg_pwd file, so this setting can be pointed directly to one of those backend files.

What is the 3rd column of the file used for?
(the 1st being username and 
the 2nd being md5 hashed password)

Regards
Alex


On Wed, Nov 13, 2013 at 12:43 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote:
On Wed, 2013-11-13 at 12:28 +0100, Alexander Farber wrote:
> on CentOS 6.4 I'm moving from 8.4 to 9.3, but can not find the file
> /var/lib/pgsql/9.3/data/global/pg_auth which I need for the pg_bouncer.
>
> Does anybody please know where to find that file?

It was removed about 4 years before. You can use mkauth.py to generate
the auth file. Here is a blog post about how to do it:

http://www.depesz.com/2010/12/04/auto-refreshing-password-file-for-pgbouncer/

Re: Can't find /var/lib/pgsql/9.3/data/global/pg_auth

От
Devrim GÜNDÜZ
Дата:
Hi,

On Wed, 2013-11-13 at 12:58 +0100, Alexander Farber wrote:

> The "man 5 pgbouncer" is slightly outdated then,
> it doesn't explain the auth_file format in detail:
>
>        auth_file
>            The name of the file to load user names and passwords from. The
> file format is the same as the PostgreSQL
>            pg_auth/pg_pwd file, so this setting can be pointed directly to
> one of those backend files.
>
> What is the 3rd column of the file used for?
> (the 1st being username and
> the 2nd being md5 hashed password)

There are two columns actually -- pgbouncer ignores the rest:

http://pgbouncer.projects.pgfoundry.org/doc/config.html#_authentication_file_format

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Вложения