Re: libpgtcl COPY out problem - why PQgetlineAsync() ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpgtcl COPY out problem - why PQgetlineAsync() ?
Дата
Msg-id 26778.1049160807@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpgtcl COPY out problem - why PQgetlineAsync() ?  (ljb <lbayuk@mindspring.com>)
Список pgsql-interfaces
ljb <lbayuk@mindspring.com> writes:
> It looks to me like the problem is in PgInputProc() which reads from the
> PostgreSQL connection during COPY TO STDOUT. Why is this doing non-blocking
> reads using PQgetlineAsync()?

So that it won't block, of course ;-)

> If there isn't a complete line of data
> available from the backend, this will return 0, which Tcl will see as EOF
> since the channel is in non-blocking mode. Am I missing something?

It won't see it as EOF, *because* the channel is in non-blocking mode.

I don't see a reason for a performance issue here.  At worst, this code
should execute one extra traversal of PgInputProc per received packet.
Can you dig into it and find out what's really happening?
        regards, tom lane



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

Предыдущее
От: ljb
Дата:
Сообщение: libpgtcl COPY out problem - why PQgetlineAsync() ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Oracle Porting, Compiere