Thread: Bug in TupleQueueReaderNext() ?

Bug in TupleQueueReaderNext() ?

From
Rushabh Lathia
Date:
Hi All,

TupleQueueReaderNext() always pass true for the nowait into
shm_mq_receive() call. I think here it need to pass the nowait
which is passed by the caller of TupleQueueReaderNext.

This is usefull if the caller want TupleQueueReaderNext() to wait
until it gets the tuple from the particular queue.

PFA to fix the same.

Regards,
Rushabh Lathia
Attachment

Re: Bug in TupleQueueReaderNext() ?

From
Robert Haas
Date:
On Wed, Dec 16, 2015 at 1:09 AM, Rushabh Lathia
<rushabh.lathia@gmail.com> wrote:
> TupleQueueReaderNext() always pass true for the nowait into
> shm_mq_receive() call. I think here it need to pass the nowait
> which is passed by the caller of TupleQueueReaderNext.
>
> This is usefull if the caller want TupleQueueReaderNext() to wait
> until it gets the tuple from the particular queue.

Boy, that's an embarassing mistake.  *blushes*

Thanks for the report and fix.  Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company