Re: Cheapest way to poll for notifications?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cheapest way to poll for notifications?
Дата
Msg-id 24912.1260464796@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cheapest way to poll for notifications?  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> Tom Lane wrote:
>> The backend certainly will push the notification.  Maybe you just have
>> a client-side-software issue?

> Testing with two plain old psql sessions to an 8.4.1 DB on linux (Ubuntu
> 9.10) here, I don't see the asynchronous notification until I send some
> other command to the database from the client. It's the same over a
> local UNIX socket or a loopback TCP/IP connection (with SSL).

psql is not too bright about that; when it's waiting for user input it
just waits.  But I don't think it matters because nobody is going to
write an application that depends on this in psql anyway.  If you are
writing something that uses libpq directly, it's certainly possible to
watch for incoming notifies along with whatever else your event loop is
watching for.  (I had an application that did so a dozen years ago...)

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Fw: ERROR: could not open relation with OID 59132
Следующее
От: Postgre Novice
Дата:
Сообщение: Re: Fw: ERROR: could not open relation with OID 59132