Io.crate v2.6.0 pgjdbc no read timeout

Hi there,

it seems that postgres jdbc driver 42.2.5 comes with the issue that socket timeout is not being applied. I tested postgres jdbc driver 42.2.23 and I could verify that issue as resolved.

Since crate driver 2.6.0 forks pgjdbc 42.2.5 that issue is inherited.

Are there any plans to upgrade the crate driver any time soon or any advice how to work around this issue ?

BR

Hi @Edo_Civic,

we recommend to use the official PostgreSQL JDBC Driver (starting with CrateDB 4.2.0 and newer).

Is it feasible for you to switch from crate-jdbc to postgres-jdbc?

Johannes

2 Likes

Well … a lot of JPA converters want to be changed, but if switching to postgres-jdbc is the way to go, so shall it be.

Thanks for the quick answer.
BR

1 Like

Update.

Switching to postgres-jdbc didn’t work even after adapting the converters.

Luckily providing a custom SocketFactory to crate-jdbc 2.6.0 did the trick.

1 Like

Hi @Edo_Civic,

cool that you could find a workaround for your issue :raised_hands:

Can you elaborate a bit on what the problem with postgres-jdbc was?

Dear Edo,

thank you for reporting your observations.

Thank you for letting us know.

I am also quite interested in the relevant details because we are aiming at collecting all reasons and issues why the vanilla postgres-jdbc driver wouldn’t work in reality, for common cases as well as possible edge cases. You would do us a great favor to share more details about it.

With kind regards,
Andreas.

I investigated bit more and found out it was silently failing on insert row, because of a text array column (PGobject wrong type/value usage). I guess that will be fine once the type/value mapping is correct, since insert works fine when I make that property transient.

Beside that crate logs are full of:

[2021-08-09T09:22:27,068][INFO ][i.c.p.s.SetSessionPlan   ] [Einshorn] SET SESSION STATEMENT WILL BE IGNORED: extra_float_digits
[2021-08-09T09:22:27,070][INFO ][i.c.p.s.SetSessionPlan   ] [Einshorn] SET SESSION STATEMENT WILL BE IGNORED: application_name

messages. Is there a way to turn off those specific log messages ?

BR