Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot specify database with space in name in config #971

Open
Bilge opened this issue Oct 26, 2023 · 2 comments
Open

Cannot specify database with space in name in config #971

Bilge opened this issue Oct 26, 2023 · 2 comments

Comments

@Bilge
Copy link

Bilge commented Oct 26, 2023

Although the documentation seems to claim that simply quoting the dbname is sufficient, the following config will cause PgBouncer to cease to start up:

[databases]
"Foo Bar" = host=foo

ERROR syntax error in configuration (/etc/pgbouncer/pgbouncer.ini:14), stopping loading

Nevertheless, in general, PgBouncer handles such database names just fine. We know this because the following config works:

[databases]
* = host=foo

Whereafter we can connect to a database so named "Foo Bar" or whatever else. It seems this is simply a bug in the configuration parser.

@JelteF
Copy link
Member

JelteF commented Oct 27, 2023

Yes, this is a problem. This should be fixed in a libusual its cfparser: https://github.com/libusual/libusual/blob/master/usual/cfparser.c

Feel free to provide a PR on that repo.

@Bilge
Copy link
Author

Bilge commented Oct 27, 2023

I think that may be beyond my ability. Maybe it's time to switch to a real file format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants