-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Slow connect with PostgreSQL 14 image #895
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
Comments
So, it seems that with the swap to
And with that, even though So running your tests by adding the following to the environment of the POSTGRES_HOST_AUTH_METHOD: "scram-sha-256"
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256" pg14 full connect time: [7.9032 ms 7.9241 ms 7.9454 ms]
pg13 full connect time: [7.9242 ms 7.9444 ms 7.9648 ms] Alternatively, adding the following to the environment of the POSTGRES_INITDB_ARGS: "--auth-host=md5" pg14 full connect time: [1.4247 ms 1.4323 ms 1.4394 ms]
pg13 full connect time: [1.4347 ms 1.4446 ms 1.4538 ms] Note: we will likely change the default "POSTGRES_HOST_AUTH_METHOD" in the |
I've added #897 to auto adjust the value that the entrypoint puts into |
Yay. I'll give this a spin later this weeks. Thank you! |
Works like a charm. Thank you. |
We've been witnessing a regression when integrating the PostgreSQL 14 docker image to our CI setup. We run about 18000 tests with PostgreSQL Docker images from 9 to 13, and adding the version 14 to our test setup showed a huge slowdown on how fast our tests finish. Typically on CI a PostgreSQL test run takes about 15 minutes, but with version 14 the tests were completed after over an hour.
I could minimize our test setup to a simple test project, with benchmarks for the following:
SELECT 1
on both versions using the same connection.We see the following results
As seen from the results, forming a new connection to version 14 docker image takes quite a bit longer compared to 13. Of course the first thing to check is changing the
password_encryption
setting fromscram-sha-256
tomd5
, but this has no effect.The interesting thing here is, that by running the databases without docker, with two different nix configurations:
And the other one with
package = pkgs.postgresql_13
, actually do not show any difference with connection times, which are hovering between 0.8 and 0.9ms. I'm interested is this due to some configuration in the PostgreSQL 14 docker image, or is it a regression in Docker itself that is somehow visible with some changes in the database.> docker --version Docker version 20.10.9, build v20.10.9
Issue for rust-postgres: sfackler/rust-postgres#829
The text was updated successfully, but these errors were encountered: