Re: LISTEN vs. two-phase commit
От | Mark Mielke |
---|---|
Тема | Re: LISTEN vs. two-phase commit |
Дата | |
Msg-id | 47D5E647.8080308@mark.mielke.cc обсуждение исходный текст |
Ответ на | LISTEN vs. two-phase commit (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: LISTEN vs. two-phase commit
|
Список | pgsql-hackers |
Tom Lane wrote: > Does it make any sense to allow LISTEN or UNLISTEN in a prepared > transaction? > ... > > Comments? > Assuming I understand your question - I don't think of LISTEN or UNLISTEN as being valuable from a transaction perspective. It's possible I'm missing something - but I think the transaction overhead, and attempts to re-use PostgreSQL tables to implement LISTEN/NOTIFY to be clever but mis-guided. To be practical, LISTEN/NOTIFY should be as fast as possible, and should never create performance problems, or incur performance overhead related to transactions. I had thought of using LISTEN/NOTIFY recently, and upon reading the threads leading up to this, I was disappointed to hear, and that see for myself, how asynchronous notify was not immediate within psql, and how under some circumstances, even with asynchronous notify, it may take a rather lengthy time before the notify reaches the target. I expect such notification to be nearly instantaneous, and given this knowledge, I would choose to use a LISTEN/NOTIFY mechanism outside PostgreSQL for my next project. Now, does LISTEN/NOTIFY belong outside PostgreSQL in the first place? I'm not sure... Cheers, mark -- Mark Mielke <mark@mielke.cc>
В списке pgsql-hackers по дате отправления: