After changing out Postgres to Cockroach in my Spring-boot application I begin to get this issue:
The fastpath function lo_creat is unknown.
Then log:
org.postgresql.util.PSQLException: The fastpath function lo_creat is unknown.
at org.postgresql.fastpath.Fastpath.getID(Fastpath.java:297) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:146) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:158) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.fastpath.Fastpath.getOID(Fastpath.java:209) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:295) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:278) ~[postgresql-42.2.14.jar!/:42.2.14]
at org.postgresql.jdbc.PgPreparedStatement.setClob(PgPreparedStatement.java:1215) ~[postgresql-42.2.14.jar!/:42.2.14]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setClob(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar!/:na]
Is there a easy workaround for this in spring-boot? As it doesn't seem to be available for cockroach.
It seems to be related to hibernate and DB text fields.
Spring Boot should let you configure the DB dialect. Can you try setting the following:
The CockroachDB dialect should avoid using these LOB functions.