Re: Notify enhancement
От | Gregory Stark |
---|---|
Тема | Re: Notify enhancement |
Дата | |
Msg-id | 878xhnn1qj.fsf@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Notify enhancement (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > Andrew Dunstan <andrew@dunslane.net> writes: >> Alvaro Herrera wrote: >>> What will happen when the ring is full? NOTIFY blocks? >>> >> An error, I think, don't you? Blocking seems totally unacceptable. > > That seems like a curious answer. Imagine the documentation: > "NOTIFY may fail for no reason whatsoever." I'd vote for blocking. > Otherwise, apps have to treat NOTIFY as an unreliable communication > mechanism, which reduces its use-case to approximately nil. This will run into the same issue that bidirectional pipes run into with deadlocks. The usual approach in Unix for dealing with this is having the application always -- even while blocked trying to write -- read any pending input and buffer it in user-space until it has enough to proceed. This may be hard to arrange in SQL? I think you would need a way for a PL/pgsql to escape a blocking write and read any pending notifications. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: