Closed neverchanje closed 10 months ago
It's likely that we send unexpected pgwire responses after set application_name=''
.
The driver tests has no similar issues in Java. Looks like it only occurs in Clojure's JDBC.
Postgres can pass this test.
static Connection establishConnection() throws SQLException {
final String url = "jdbc:postgresql://localhost:4566/dev";
Properties props = new Properties();
props.setProperty("user", "root");
props.setProperty("password", "");
props.setProperty("sslmode", "disable");
props.setProperty("ApplicationName", "Metabase vLOCAL_DEV [572649fd-85b4-4782-a4dd-0b27595588f8]");
return DriverManager.getConnection(url, props);
}
@Test
public void testEstablishConnection() throws SQLException {
Connection conn = establishConnection();
assertNotNull(conn, "Connection should not be null");
The root cause is that we didn't handle 'Metabase vLOCAL_DEV [572649fd-85b4-4782-a4dd-0b27595588f8]' correctly. Java JDBC fails on this test as well.
It's interesting to know that this issue is related to the application name's length. It only fails when the length exceeds 45 characters, e.g. "0123456789012345678901234567890123456789012345"
Describe the bug
No response
Error message/log
To Reproduce
Expected behavior
No response
How did you deploy RisingWave?
No response
The version of RisingWave
Main b578db6fe0658c16c4a54e18721017b71dfe06b3
Additional context
No response