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

Re: ReadyForQuery()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ReadyForQuery()
Date: 2007-01-04 18:17:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> Wouldn't it be better to issue ReadyForQuery() and then issue the stat
> stuff in the gap between processing? 

To me, "ready for query" means "ready for query", not "I think I might
be ready soon".  Otherwise you could argue for trying to move the
message emission much further upstream than that.  Another problem is
that on a lot of kernels, control swaps to the client process the
instant we issue the send(), and if the client is well-coded control
will swap back when it send()s us the next query.  If we rearrange
things as you suggest then the state display will become quite
misleading: it will claim we are still busy when actually the client
has the result, and it will switch to "idle" *after* we've received
a new command.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: markwkmDate: 2007-01-04 19:08:55
Subject: Re: 8.3 pending patch queue
Previous:From: Tom LaneDate: 2007-01-04 17:58:37
Subject: Re: Small vcbuild patch

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