@Override
    public synchronized Connection connection() throws SQLException {
        Connection conn = connection(true);
        if (conn instanceof HikariProxyConnection) {
            // assuming HikariCP use org.postgresql.jdbc.PgConnection
            return conn.unwrap(PgConnection.class);
        }
        return conn;
    }
Return an unwrapped PgConnection instead of HikariProxyConnection
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/postgres-cdc/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java