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

pgsql and ssl #1636

Open
gshum opened this issue Jan 29, 2025 · 2 comments
Open

pgsql and ssl #1636

gshum opened this issue Jan 29, 2025 · 2 comments

Comments

@gshum
Copy link

gshum commented Jan 29, 2025

Hi,

I'm trying to migrate from sqlite to postgres. It seems to not be connecting to the postgres database with SSL, which is required by Azure.

Failed to connect to pgsql at "<hostname_removed>" (port 5432) as user "ehmladmin": Database error 28000: no pg_hba.conf entry for host "fd40:b8b3:26:642f:7026:100:a00:4", user "ehmladmin", database "mg03_sata_largedb", no encryption

I can manually connect using psql with the same options. I'm not sure if it is failing due to the 'no encryption'? I cannot turn SSL off on this server because Azure controls many of the settings.

Is there any flag I can use to force it to use ssl when connecting with pgsql?

@gshum
Copy link
Author

gshum commented Jan 29, 2025

I got it working by changing the azure postgres setting "require_secure_transport" to off. But it seems like it should be trivial to get it working with pgloader since it is just using psql? Any ideas?

@krfty
Copy link

krfty commented Feb 3, 2025

Recently ran into this, and had success using the sslmode connection string parameter:

LOAD DATABASE
FROM postgresql://User:Pass@Host/dbName?sslmode=allow
INTO postgresql://User:Pass@Host/dbName?sslmode=allow

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

2 participants