Skip site navigation (1) Skip section navigation (2)

Re: Concurrent psql patch

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Jim Nasby <decibel(at)decibel(dot)org>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Concurrent psql patch
Date: 2007-06-01 14:17:16
Message-ID: 46602A6C.8010408@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Gregory Stark wrote:
> "Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
>
>   
>> Tom Lane wrote:
>>     
>>> Andrew Dunstan <andrew(at)dunslane(dot)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.
>
>   

Unless you have a better solution I think we'd better do that, though.

I notice that the header is also included in command.c even though it 
doesn't use PGASYNC_IDLE.

Are you going to make these fixes?

cheers

andrew

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-06-01 14:38:48
Subject: Re: Updated bitmap index patch
Previous:From: Tom LaneDate: 2007-06-01 14:12:34
Subject: Re: Hash joins vs small-integer join values

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-06-01 14:38:48
Subject: Re: Updated bitmap index patch
Previous:From: Andrew DunstanDate: 2007-06-01 11:16:16
Subject: Re: [HACKERS] like/ilike improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group