Branch: Tag:

2018-05-21

2018-05-21 01:10:53 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Extra diagnostics and release all locks upon async query termination.

517:   #endif    while (lock = (waitforreal ? nostash->lock : nostash->trylock)(1)) {    int mode; -  if (!stashcount->drained()) { -  lock = 0; // Force release before acquiring next +     stashcount->wait_till_drained(); -  continue; -  } +    #ifdef PG_DEBUGRACE    conxsess sess = conxsess(this);   #endif
848: Inside #if PG_DEBUGHISTORY > 0
   "query: %O\n"   #if PG_DEBUGHISTORY > 0    "history: %O\n" +  "stash: %O\n"   #endif    "fd: %O portalname: %O datarows: %d"    " synctransact: %d laststatus: %s\n",
855: Inside #if PG_DEBUGHISTORY > 0
   qalreadyprinted == this ? "..." : _query,   #if PG_DEBUGHISTORY > 0    qalreadyprinted == this ? 0 : c && c->i->history, +  qalreadyprinted == this ? 0 +  : c && (string)c->stash,   #endif    fd, _portalname,    datarowtypes && sizeof(datarowtypes), _synctransact,
1681:    if (!catch(plugbuffer = c->start()))    plugbuffer->sendcmd(_closeportal(plugbuffer, reflock));    reflock = 0; -  if (_state < CLOSED) +  if (_state < CLOSED) {    _state = CLOSED; -  +  stmtifkey = 0; +  }    datarows->write(1); // Signal EOF    releaseconditions();    }