This feature (ability to add a message payload to a NOTIFY) is on the
TODO list and I had undertaken to implement it. However, pressure of
other work has conspired to make that difficult, and Abhijit Menon-Sen
recently very kindly offered to help out.
Therer was some discussion of implementation late last year here:
http://groups.google.com/group/pgsql.hackers/browse_frm/thread/e63a5ac43e2508ce/ce47016235bd5a62?tvc=1&q=notify+payload&hl=en#ce47016235bd5a62
However, in various pieces of off-list discussion it appears that there
is some opposition either to the design or to the feature itself. What
is more, there will clearly be vigorous opposition to any implementation
which does NOT remove the use of pg_listener (which I understand and I
think largely agree with).
So, before an investment of any more time is made by either Abhijit or
myself, I would like to get confirmation that a) there is broad
agreement on the desirability of the feature and b) that there is broad
agreement on the general design (i.e. to use a circular buffer in shared
memory, of configurable size, to hold the outstanding message queue).
Please speak up or forever ....
cheers
andrew