Search Postgresql Archives

Re: LISTEN considered dangerous

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martijn van Oosterhout <kleptog@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux