SET extra_float_digits = 3 in postgresql

database, postgresql, sql

Solution

The queries aren't really running. As Nick says in the comments, the connections will be in idle state. `pg_stat_activity` shows the last statement that finished running when a query is idle.

As for the other part: I'd say you're using PgJDBC. `SET extra_float_digits` ensures that PgJDBC doesn't lose precision when it gets floating point values from the database. It's part of the initial connection conversation. It's normal and you can ignore it. If you're on a recent PgJDBC, send the additional connection parameter `assumeMinServerVersion=9.0` and it'll go away.

So what you have there is a bunch of new, idle connections.

Look into your application / application server's configuration. Your connection pool probably doesn't have reasonable limits set.

Problem

Whenever I start Postgresql DB engine, I have almost 7-8 queries running in the background `SET extra_float_digits = 3` I am not sure why these are running all the times. I know that the extra_float_digits variable adjusts the number of digits displayed for floating-point values in Postgresql, however I am not sure why these queries run in the background when I start the DB engine. I already have the extra_float_digits = 3 in the config file. Even if I comment it out, these queries still run in the background.. need help..Thanks

Original source