[Pgpool-hackers] database doesnot exist error

Asif Rehman asifalirehman at gmail.com
Fri May 27 11:25:04 UTC 2011


Hi,

I believe there is a difference of opinion on this topic. But I believe,
there shouldn't be a restriction to have a specific database to utilize this
tool. So I have made changes and with the attached patch, existing system
will behave exactly the same. Anyway It's your call.

I have added a configuration parameter named pool_conn_dbname and assigned
"postgres" as default value. Also made necessary changes to utilize this
parameter. If user doesn't change or add this parameter in pgpool.conf, then
the default database name "postgres" will be used.

Please let me know If there is any issues with the patch.

Regards,
--Asif

On Thu, May 26, 2011 at 12:06 PM, Guillaume Lelarge
<guillaume at lelarge.info>wrote:

> Le 05/26/2011 01:18 AM, Tatsuo Ishii a écrit :
> >>>> There shouldn't be any harm to do so. Except you won't be able to
> create
> >>>> database with the default template database (template1) while pgpool
> is
> >>>> connected to the template1 database. But it connects to it every
> >>>> health_check_period (or every 30 sec if health_check_period<=0).
> >>>>
> >>>> Anyway, this is probably something we should fix. You're not required
> to
> >>>> have a postgres database.
> >>>
> >>> Are you sure? Many of PostgreSQL tools require to have postgres
> >>> database. For example, createdb and createuser. So I think a
> >>> PostgreSQL configuration without postgres database is broken anyway
> >>> and I think pgpool-Ii do not need to take care of the case.
> >>>
> >>> BTW for #3, probably you are talking about
> >>> establish_persistent_connection(void) rather than
> >>> make_persistent_db_connection() takes database parameter, not fixed
> >>> usage of postgres database. establish_persistent_connection() is used
> >>> for streaming replication lag check, which is only available 9.0 or
> >>> later, which definitely has postgres database if you do not broke.
> >>
> >> You can drop the postgres database, and use another one as your postgres
> >> database. You only need to use the PGDATABASE env variable. It makes it
> >> really cumbersome to use createdb, createuser, and other tools, and I
> >> see no reason for doing it, but it works.
> >
> > Ok. IMO think this kind of usecase is really rare, and fixing it is
> > not worth the trouble.
>
> If Asif makes the patch himself, I don't think we should reject it. But
> it's your call.
>
>
> --
> Guillaume
>  http://www.postgresql.fr
>  http://dalibo.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110527/e8b3f62f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbname.patch
Type: application/octet-stream
Size: 7808 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110527/e8b3f62f/attachment.obj>


More information about the Pgpool-hackers mailing list