agroal / pgagroal

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

Evaluate and implement full JSON command support #448

Closed fluca1978 closed 6 months ago

fluca1978 commented 6 months ago

The management protocol works in a binary format, but some pgagroal-cli commands already send a JSON payload that is then decoded. It would be interesting to have a full JSON payload support, so that also other external applications can deal with pgagroal.

EuGig commented 6 months ago

I was trying to see which commands are actually sending a JSON payload for the sake of documenting the management interface. It looks to me that they all send a binary format, and only while reading the answer, JSON comes out in case it is specified. Am I missing something? Can you maybe indicate one command which does that? thanks!

fluca1978 commented 6 months ago

I was trying to see which commands are actually sending a JSON payload for the sake of documenting the management interface. It looks to me that they all send a binary format, and only while reading the answer, JSON comes out in case it is specified. Am I missing something? Can you maybe indicate one command which does that? thanks!

Shame on me! You are absolutely right: the payload is always binary, and is somewhere translated (e.g., pgagroal_read_status_details) into JSON before the final evaluation. Therefore, I guess this issue can be closed, since there is never a real JSON going from one side to the other.