The second packet comes from the backend and is the response to the query, and sends back multiple flags: T: row description, D: copy data, C: close, Z: ready for query, I: empty query response (commandcomplete).
I think 'C' means "Command Complete", rather than close. 'C' message means "Close" when the message is sent from client, but it means "Command Complete" when the message is sent from backend.
Also "I" does not mean empty query response here. It's part of the ready for query message and 'I' means now backend is in idle state.
Thanks for great article.
I think 'C' means "Command Complete", rather than close. 'C' message means "Close" when the message is sent from client, but it means "Command Complete" when the message is sent from backend.
Also "I" does not mean empty query response here. It's part of the ready for query message and 'I' means now backend is in idle state.
Thank you for the additions. I made some guesses, and guess I should have spent more time on it and read the source code to get the true meaning.