While testing pg_logforward with the JSON format against the postgresql regression tests (make installcheck), I noticed that one message (the infinite recursion test) creates a message that exceeds MAX_MESSAGE_SIZE (8192). The message is sent out truncated, and JSON decoding on the receiving side fails.
Some thoughts:
- MAX_MESSAGE_SIZE might as well be closer to the theoretical limit for UDP packet size (somewhere around 65000).
- If message truncation happens, truncated packets should not be sent out, because that can confuse the receiver and falsify data.
- Perhaps a special message (maybe message, detail, hint None) could be sent out of message truncation happened.
While testing pg_logforward with the JSON format against the postgresql regression tests (make installcheck), I noticed that one message (the infinite recursion test) creates a message that exceeds MAX_MESSAGE_SIZE (8192). The message is sent out truncated, and JSON decoding on the receiving side fails.
Some thoughts: