Re: Concurrent psql patch

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Concurrent psql patch
Дата
Msg-id 87iraboa56.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Concurrent psql patch  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Concurrent psql patch  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-patches
"Andrew Dunstan" <andrew@dunslane.net> writes:

> Tom Lane wrote:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>
>>>             if (pset.c->db->asyncStatus != PGASYNC_BUSY)
>>>             {
>>>                 break;
>>>             }
>>>
>>
>> There already is a defined API for this, namely PQisBusy().

Oh, now I remember why I'm including libpq-int.h. It's not for PGASYNC_BUSY as
above. The case above can indeed be fixed using PQIsBusy() (and select/poll
looping).

The missing interface is for PGASYNC_IDLE. The problem is that I didn't really
want to have psql go through the trouble to check all the connections for
waiting output if it didn't have any queries pending.

This could be fixed by having psql track which connections are waiting for
query results. It's a bit annoying to have two state bits that hold the same
data at two different levels of abstraction though.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Seq scans status update
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Concurrent psql patch