Skip to content

Does not work with official postgres:10 ( or earlier ) due to pg_hba.conf #16

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

Closed
EugenMayer opened this issue Aug 4, 2019 · 5 comments

Comments

@EugenMayer
Copy link

When using your image to migrate the databases, pg_hba.conf will be replaced using a version, which will not allow other hosts to connect using a password

this line is not included in the pg_hba.conf of the newly migrate DATA folder, lets assume pg11

host all all all md5

One can easily copy this file from pg10/data/pg_hba.conf to pg10/data/pg_hba.conf or just add the line i mentioned - but we might also consider mention this in the readme.

Without that, PG boots up just fine, the migratoin did work just fine - just no other service in the docker stack can use PG since they cannot connect to it :)

@tianon
Copy link
Owner

tianon commented Aug 5, 2019

I think this might technically be a "duplicate" of #1 😅

(Although perhaps now closer to being realistic for fixing via docker-library/postgres#496!)

@EugenMayer
Copy link
Author

Maybe add a "known issues" in the readme adding this note, since i ran into this backwards, wasted a bit of time to find out why the server is "not working" - great to see the complex bootstrap components being split up into reusable chunks.

@EugenMayer
Copy link
Author

For anybody, just a quickfix: After starting your new ( upgraded ) db and it complains about the missing entry, just exec into the postgresql container and run

 echo "host all all all md5" >> /var/lib/postgresql/data/pg_hba.conf

and restart the postgresql container

@inspiraller
Copy link

What if you are using replication, via docker stack deploy and want to have the same logic across instances?

@tianon
Copy link
Owner

tianon commented Jul 17, 2024

You'll need to make your own (possibly derivative) image as your needs have advanced beyond the very basic proof of concept this repository contains.

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

3 participants