LibPQ.jl
LibPQ.jl copied to clipboard
sslmode = require issue
hello - I need to set sslmode = require
in my LibPQ.Connection to connect to a cloud postgresdb. I cant connect because it seems this option is not available on the connection parameters that can be set?
"sslmode=require"
should work in the DSN.
the connection itself works ( with sslmode = require ) , but it crashes when I try to do a simple execute statement to pull data result = execute(conn, "SELECT * FROM mytable limit 10")
.
I had the same problem when using mysql.jl and it turned out it was an issue with how the sslmode was set in the package. it has been fixed now. I am seeing the same issue here. I am able to connect to the postgres db with a regular db desktop client using the same credentials. But i get the error message below when i try to run the excute statement above. I got in touch with timescale ( my cloud provider for the postgres db ) and they say its not a license issue ( since I am able to connect ok normally). Not sure how to proceed.
InternalError: ERROR: invalid value for timescaledb.license_key 'Exxx='
Stacktrace:
[1] error(::Memento.Logger, ::LibPQ.Errors.PQResultError{LibPQ.Errors.CXX,LibPQ.Errors.EXX000}) at C:\Users\vacqu\.juliapro\JuliaPro_v1.4.0-1\packages\Memento\kUo0a\src\loggers.jl:454
[2] handle_result(::LibPQ.Result; throw_error::Bool) at C:\Users\vacqu\.juliapro\JuliaPro_v1.4.0-1\packages\LibPQ\QljsB\src\results.jl:228
[3] execute(::LibPQ.Connection, ::String; throw_error::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\vacqu\.juliapro\JuliaPro_v1.4.0-1\packages\LibPQ\QljsB\src\results.jl:280
[4] execute(::LibPQ.Connection, ::String) at C:\Users\vacqu\.juliapro\JuliaPro_v1.4.0-1\packages\LibPQ\QljsB\src\results.jl:276
[5] top-level scope at In[20]:9
Can you give me your full DSN (with any important details anonymized)?
you mean this ?
conn = LibPQ.Connection(" host = myhost
user = xx
port = 12345
sslmode = require
dbname = defaultdb
password = xxxx ")
without the execute statement, I get this:
PostgreSQL connection (CONNECTION_OK) with parameters:
user = xx
password = ********************
dbname = defaultdb
host = xxxxx
port = 12345
client_encoding = UTF8
options = -c DateStyle=ISO,YMD -c IntervalStyle=iso_8601 -c TimeZone=UTC
application_name = LibPQ.jl
sslmode = require
sslcompression = 0
gssencmode = disable
krbsrvname = postgres
target_session_attrs = any
Yes thanks. I'll look to see if there are any important compatibility issues around PostgreSQL in the timescaledb docs.
much appreciated. thank you. I can also connect you with the timescale devs