pike.git/
lib/
modules/
Sql.pmod/
pgsql_util.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2016-10-15
2016-10-15 00:35:33 by Stephen R. van den Berg <srb@cuci.nl>
bfa255e5d5833de3fccccabbcb4a764e74ca470a (
17
lines) (+
11
/-
6
)
[
Show
|
Annotate
]
Branch:
8.0
pgsql: Eliminate hanging selects.
156:
realbuffer=_realbuffer; }
+
final int `stashcount() {
+
return realbuffer->stashcount;
+
}
+
final bufcon start(void|int waitforreal) { realbuffer->stashcount++; #ifdef PG_DEBUG
930:
PD("%O Try Closeportal %d\n",_portalname,_state); Thread.MutexKey lock=closemux->lock(); _fetchlimit=0; // disables further Executes
-
int alreadyfilled=sizeof(plugbuffer);
-
/* alreadyfilled will be non-zero if a parse request has been queued
-
* before the close was initiated.
-
* It's a bit of a tricky race, but this check should be sufficient.
-
*/
+
switch(_state) { case PORTALINIT: _unnamedstatementkey=0;
958:
PD("Signal no portals in flight\n"); catch(pgsqlsess->_readyforcommit->signal()); lockc=0;
-
} else if(!
alreadyfilled
)
+
/*
+
* stashcount will be non-zero if a parse request has been queued
+
* before the close was initiated.
+
* It's a bit of a tricky race, but this check should be sufficient.
+
*/
+
} else if
(!
plugbuffer->stashcount
)
pgsqlsess->_readyforquerycount++, retval=SYNCSEND; pgsqlsess->_pportalcount=0; }