vert-x3 / vertx-mysql-postgresql-client

This client is deprecated - use instead
https://github.com/eclipse-vertx/vertx-sql-client
Apache License 2.0
117 stars 59 forks source link

PostgreSQL message/record size #119

Closed ldvhome closed 4 years ago

ldvhome commented 6 years ago

In BaseSQLClient.class package io.vertx.ext.asyncsql.impl dependency there is a limit for a record size set to 16777216. The internal config parameter name is maximumMessageSize.

When trying to download a large file from the database, the server produces an error: com.github.mauricio.async.db.postgresql.exceptions.MessageTooLongException: Message of type 68 has size 38080055, higher than the limit 116777216.

Unfortunately there is no way to change the limit without the code modification (which I temporarily did)

It would be useful to be able to set that limit up in JsonObject config (additional configuration key)

How can I get large files from the database?

Best regards ldvhome

gtejasvi commented 5 years ago

Having the same issue with our code too. Is there any possiblity of getting a fix for this

vietj commented 5 years ago

can you contribute a fix ?

codepitbull commented 5 years ago

There isn't really a good way to fix it. The value is hardcoded here: https://github.com/mauricio/postgresql-async/blob/5d0a7e017e90f137a9cb0b0e20947c6bc8817b0a/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/codec/MessageDecoder.scala

We don't instantiate it directly, it's done by the driver. Since the maintainer stopped supporting the driver we are pretty much screwed.

I already have another open PR that isn't getting merged and there are no more releases coming up.

dburyak commented 4 years ago

We had the same problem. Luckily, we we're at the very beginning of using vertx and were able to switch to another mysql vertx client. That solved this problem. https://vertx.io/docs/vertx-mysql-client/java/