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

Unable to connect on PostgreSQL via pgbouncer. #559

Closed
jmarfr opened this issue Mar 10, 2014 · 8 comments
Closed

Unable to connect on PostgreSQL via pgbouncer. #559

jmarfr opened this issue Mar 10, 2014 · 8 comments

Comments

@jmarfr
Copy link

jmarfr commented Mar 10, 2014

Hi,
I'm trying to connect commafeed on postgresql via pgbouncer but I'm getting this error in pgbouncer


2014-03-10 21:13:59.385 5773 WARNING C-0x1be8bb0: (nodb)/(nouser)@127.0.0.1:38733 unsupported startup parameter: extra_float_digits=2
2014-03-10 21:13:59.385 5773 LOG C-0x1be8bb0: (nodb)/(nouser)@127.0.0.1:38733 closing because: Unsupported startup parameter: extra_float_digits (age=0)
2014-03-10 21:13:59.385 5773 WARNING C-0x1be8bb0: (nodb)/(nouser)@127.0.0.1:38733 Pooler Error: Unsupported startup parameter: extra_float_digits

Commafeeds logs show this :

https://gist.github.com/moumoul/9473401

My database configuration file is like this:

        <Resource id="PostgreSQL" type="DataSource">
                JdbcDriver org.postgresql.Driver
        JdbcUrl jdbc:postgresql://localhost:6432/commafeed
                UserName xxxxxxxxxxxxx
                Password xxxxxxxxxxxx
                MaxActive 5
        </Resource>

This configuration file is working fine when I'm directly connect to PostgreSQL.

@Athou
Copy link
Owner

Athou commented Mar 10, 2014

@jmarfr
Copy link
Author

jmarfr commented Mar 10, 2014

My bad. Why did I not find this by myself ! It works !
Thanks for your help.

@jmarfr jmarfr closed this as completed Mar 10, 2014
@isapir
Copy link

isapir commented Jan 7, 2016

So to save the next guy from clicking the link above, the "fix" is to add this to the config.ini under the [pgbouncer] section:

ignore_startup_parameters = extra_float_digits

@T3rm1
Copy link

T3rm1 commented Feb 12, 2018

An explantion why this happens and what it does and why it is not the default would be nice to get a better understanding :)

@JosDeGraeve
Copy link

To save the next next guy some more clicks:

http://lists.pgfoundry.org/pipermail/pgbouncer-general/2008-November/000307.html

There are few parameters that pgbouncer can keep track of.
Like client_encoding. Because postgres reports back chenges
of that parameter. The 'extra_float_digits' is not one of them.
Thus, in transaction pooling mode, there is no way to give
consistent picture of that parameter to clients.

Giving hard-error instead of ignoring by default is delierate,
so admin can decide if the parameter is actually important
for application logic. If it is then you should make
if default from postgres config.

@Preetham-Srinivasan
Copy link

So to save the next guy from clicking the link above, the "fix" is to add this to the config.ini under the [pgbouncer] section:

ignore_startup_parameters = extra_float_digits

I'm getting the below error even after adding the below line under [pgbouncer] in .ini file.
ignore_startup_parameters = extra_float_digits


unsupported startup parameter: options=-c extra_float_digits=2
closing because: unsupported startup parameter: options (age=1s)
pooler error: unsupported startup parameter: options


Can someone please advise?

@bmjjr
Copy link

bmjjr commented Mar 19, 2019

@Preetham-Srinivasan You probably had ignore_startup_parameters assigned twice. Search the file and ensure it is only assigned once.

@tim-ireland
Copy link

@Preetham-Srinivasan I believe you want ignore_startup_parameters = options in your case

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

8 participants