Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message buffer limit creates invalid JSON #3

Open
petere opened this issue Sep 7, 2012 · 0 comments
Open

message buffer limit creates invalid JSON #3

petere opened this issue Sep 7, 2012 · 0 comments

Comments

@petere
Copy link
Contributor

petere commented Sep 7, 2012

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant