vertx-sql-client icon indicating copy to clipboard operation
vertx-sql-client copied to clipboard

NPE in PgDecoder if a notice is raised while no query is being executed

Open tsegismont opened this issue 1 year ago • 1 comments
trafficstars

See #1442

This may happen if the connection is used by a PgSubscriber.

tsegismont avatar Aug 28 '24 16:08 tsegismont

no test ?

vietj avatar Aug 28 '24 20:08 vietj

@vietj I searched the web for cases when the server would raise a notice/error not related to a client request, but I couldn't find any. Have you encountered this case yourself before?

tsegismont avatar Aug 29 '24 09:08 tsegismont

I think it can be reproduced using a proxy, we have similar tests like that

vietj avatar Aug 29 '24 09:08 vietj

you can look at testDisconnectAbruptlyDuringStartup

vietj avatar Aug 29 '24 09:08 vietj

I think you misunderstood my comment, the problem is not to test re-connection, the problem is to force the PostgreSQL server to raise a notice message while there are no inflight commands on the connection.

Afaiu this is not the case in testDisconnectAbruptlyDuringStartup

tsegismont avatar Aug 29 '24 13:08 tsegismont

yes, Im saying to use the proxy server to create a fake message to be sent to the client using it

On Thu, Aug 29, 2024 at 3:19 PM Thomas Segismont @.***> wrote:

I think you misunderstood my comment, the problem is not to test re-connection, the problem is to force the PostgreSQL server to raise a notice message while there are no inflight commands on the connection.

Afaiu this is not the case in testDisconnectAbruptlyDuringStartup

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

vietj avatar Aug 29 '24 21:08 vietj

@vietj PTAL

Thanks for the tip

tsegismont avatar Aug 30 '24 13:08 tsegismont