Re: Size limit for NOTIFY payload

Greg Sabino Mullane <htamfids@gmail.com>

From: Greg Sabino Mullane <htamfids@gmail.com>
To: sulfinu@gmail.com
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-docs@lists.postgresql.org
Date: 2024-12-20T14:16:30Z
Lists: pgsql-docs
On Fri, Dec 20, 2024 at 5:53 AM <sulfinu@gmail.com> wrote:

> Well, as I said, that's a *text* value with a *byte* limit. The
> documentation should definitely mention something like *"with the default
> database encoding"*.
>

I'm not sure why you think adding such wordage is needed. Bytes is bytes.
Your application should be checking the number of bytes in the string sent
to NOTIFY.

On a related note, if you find yourself approaching the payload limits, you
might want to rethink the way you are using LISTEN/NOTIFY.

Cheers,
Greg