Problems connecting to postgres - ERROR: 08P01: Unsupported startup parameter: extra_float_digits

2,687 views
Skip to first unread message

asir...@gmail.com

unread,
Sep 13, 2014, 3:15:35 PM9/13/14
to npgsq...@googlegroups.com
I wrote a little app to connect to postgres and read some data as a start.
The postgres I am connecting to is version 9.4 beta 2.
When the Open() method executes on the connection object I get an exception with the following error message:
ERROR: 08P01: Unsupported startup parameter: extra_float_digits

How do I get around this issue?

Thanks,
Ari

Shay Rojansky

unread,
Sep 14, 2014, 1:31:50 AM9/14/14
to npgsq...@googlegroups.com, asir...@gmail.com
Ari,

Postgresql itself does support this parameter, are you using pgbouncer for connection pooling by any chance? If so then that maybe be the problem. Check out this thread, it contains a workaround. Please confirm back if this is the case.

Note that we are strongly considering dropping the automatic setting of this parameter in the next major version of Npgsql because of other issues.

One last unrelated question: Npgsql contains a built-in connection pool, any specific chance you're using pgbouncer? Is there any unsupported feature or something in the Npgsql pool?

Shay

asir...@gmail.com

unread,
Sep 15, 2014, 9:27:40 AM9/15/14
to npgsq...@googlegroups.com, asir...@gmail.com
Hi Shay,

Thanks for your comments and suggestions.
Yes, pgbouncer is in the equation although I am not doing anything from the coding side to alter any of the connection pooling settings.

I followed both links. It seems that Roji removed this setting from the npgslq driver less than 22 hours ago. Do you know when this would be available for use?

As for changing the pgbouncer setting, as suggested by the other link, it seems I don't have permission to do this as I am not the owner of the installation. Although I will ask the owner to make that change, I would prefer not changing anything on that box as it may affect others.

Thanks,
Ari

Shay Rojansky

unread,
Sep 15, 2014, 10:03:26 AM9/15/14
to npgsq...@googlegroups.com, asir...@gmail.com
Hi Ari.

Yes, I made the change to remove the problematic parameter (it hasn't been merged to master yet).

However, this is a breaking change as it impacts how floats will be converted, so it won't be released before Npgsql 3.0, which is a while off.

The change to pgbouncer is merely to make it ignore the parameter which it doesn't otherwise recognize - it should have zero impact on any other user and should be an acceptable workaround. If, however, you really cannot make this change, then I can only suggest you compile a version of Npgsql based on our 2.2.0 release with my change (i.e. without the parameter).

Shay

asir...@gmail.com

unread,
Sep 15, 2014, 10:50:40 AM9/15/14
to npgsq...@googlegroups.com, asir...@gmail.com
Hi Shay,

Sorry didn't realize it was you who made the change :)
I finally added the setting "ignore_startup_parameters = extra_float_digits" to the pgbouncer.ini file but it didn't make any difference. I still got the error on Open().

What would I have to download to rebuild my own copy of the driver with your changes?

Thanks,
Ari

Shay Rojansky

unread,
Sep 15, 2014, 11:40:59 AM9/15/14
to npgsq...@googlegroups.com, asir...@gmail.com


On Monday, September 15, 2014 5:50:40 PM UTC+3, asir...@gmail.com wrote:
Hi Shay,

Sorry didn't realize it was you who made the change :)
I finally added the setting "ignore_startup_parameters = extra_float_digits" to the pgbouncer.ini file but it didn't make any difference. I still got the error on Open().

That's surprising...  I'd double-check to make sure that you made the change correctly, it's impossible that the error is coming from Postgresql itself...
 

What would I have to download to rebuild my own copy of the driver with your changes?

If you want to go down the route of a custom Npgsql, it's very easy. Get the 2.2.0 Npgsql sources (either by cloning our github repository and checking out the v2.2.0 tag, if you're comfortable with git, or by downloading the source ZIP at the Npgsql releases page). Then, make the modifications I did in the pull request. Note that you need to remove extra_float_digits from two places. Finally just compile it (any VS version should work, or even msbuild/xbuild).

Let me know if you have any further trouble.

 

Thanks,
Ari

Reply all
Reply to author
Forward
0 new messages