Re: Listen / Notify - what to do when the queue is full

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Andrew Chernow <ac@esilo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Joachim Wieland <joe@mcknight.de>, Greg Smith <greg@2ndquadrant.com>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, "Florian G. Pflug" <fgp@phlo.org>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers@postgresql.org, Arnaud Betremieux <arnaud.betremieux@keyconsulting.fr>
Date: 2010-02-10T00:30:35Z
Lists: pgsql-hackers
On Tue, 2010-02-09 at 19:02 -0500, Andrew Chernow wrote:
> Wouldn't binary payloads be an alternative?  NOTE: I may have missed this 
> discussion.  Sorry if it has already been covered.

The Notify struct has a "char *" field, which can't hold embedded NULL
bytes, so it can't really be binary. But it can't be arbitrary text,
because it has to be encoded in a way that works for every possible
client encoding (otherwise there's a possibility of an error, and no way
to handle it).

Also, the query starts out as text, so we need a way to interpret the
text in an encoding-independent way.

So, I think ASCII is the natural choice here.

Regards,
	Jeff Davis