pgsql and ssl
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?
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?
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