Issue 1:
connect to the database sharding_db,which is a logical postgresql database(use sharding-proxy for database-spliting). when I am using some database client-tools,such as navicat,pg_dump.

It always complain that I don't specify client-encoding, even I indeed do it already:

root@a15d5aac4a11:/var/lib/postgresql/data# pg_dump -E UTF8 -U postgres -d sharding_db -h 192.168.10.53 -p 13308 > test.sql
pg_dump: [archiver (db)] connection to database "sharding_db" failed: ERROR: Null charset name

Logs

I run sharding-proxy as a docker container, the logs digest as below:

[ERROR] 2021-12-07 10:07:12.535 [epollEventLoopGroup-3-7] o.a.s.p.f.n.FrontendChannelInboundHandler - Exception occur:
java.lang.IllegalArgumentException: Null charset name
at java.nio.charset.Charset.lookup(Charset.java:457)
at java.nio.charset.Charset.forName(Charset.java:528)
at org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.processStartupMessage(PostgreSQLAuthenticationEngine.java:85)
at org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.authenticate(PostgreSQLAuthenticationEngine.java:78)
at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.authenticate(FrontendChannelInboundHandler.java:80)
at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.channelRead(FrontendChannelInboundHandler.java:72)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

Issue 2:
There are 30 connections, two instances in total

Problem Description:

Multiple instances refresh the data source, reload the data source, and create a link. Before this process, first check the old data source and new data source, including fragment configuration; CLose new and old data sources have interactive data source links ，Use new data source list

Before refresh

There are 60 connections

After refresh

There are 90 connections

org.apache.shardingsphere.shardingjdbc.jdbc.adapter.AbstractDataSourceAdapter#close(java.util.Collection<java.lang.String>)

Database link exception after closing