Skip to content

message buffer limit creates invalid JSON #3

@petere

Description

@petere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions