agroal / pgagroal

High-performance connection pool for PostgreSQL
https://agroal.github.io/pgagroal/
BSD 3-Clause "New" or "Revised" License
681 stars 61 forks source link

Bug-fix in cli remote connection #445

Closed ashu3103 closed 4 months ago

ashu3103 commented 4 months ago

Work in Progress

@jesperpedersen PTAL

Bug Fix

There is also a bug fix in this commit -

Now (uptill the latest commit), if we try to connect remotely to the management port from cli it will give error --> Segmentation fault (core dumped) because at line number 706 in cli.c :-

if (pgagroal_connect(host, atoi(port), &socket, config->keep_alive, config->non_blocking, &config->buffer_size, config->nodelay))

we were passing extra arguments to pgagroal_connect which comes from config which was not defined for remote connection sequence of execution as per the latest code.

So currently, remote connection functionality won't work!!

jesperpedersen commented 4 months ago

Merged.

Thanks for your contribution !