Martijn van Oosterhout <kleptog@svana.org> writes:
> It's slightly surprising though. I havn't seen anyone else complain
> about this before though. The only way to fix this is to make the
> LISTEN completely atransactional, so NOTIFY can see uncomitted LISTENs
> also.

There isn't anything very desirable about the table-based approach to
NOTIFY :-(  I've previously proposed switching to an implementation
similar to sinval messaging, which would completely eliminate the need
for notifiers to be aware of who is listening.  However, I'm unconvinced
that the OP's complaint is valid.  I would still expect any
reimplementation of notify messaging to honor the principle that a
LISTEN doesn't take effect till you commit.  Otherwise, what of

        BEGIN;
        LISTEN foo;
        ROLLBACK;

?  If I get some events for foo after this I'd surely think it was
broken.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to