Branch: Tag:

2014-12-01

2014-12-01 16:02:50 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Improve backtraces in debugging mode.

253:    started=lock;    lock=shortmux->lock();    if(stashcount) -  stashavail.wait(lock); +  PT(stashavail.wait(lock));    add(stash); stash->clear();    foreach(stashqueue->try_read_array();;sql_result portal)    queueup(portal);
541:    private void waitfordescribe() {    Thread.MutexKey lock=_ddescribemux->lock();    if(!datarowtypes) -  _ddescribe->wait(lock); +  PT(_ddescribe->wait(lock));    lock=0;    }   
832:    if(pgsqlsess->_portalsinflight) {    pgsqlsess->_waittocommit++;    PD("Commit waiting for portals to finish\n"); -  pgsqlsess->_readyforcommit->wait(lock); +  PT(pgsqlsess->_readyforcommit->wait(lock));    pgsqlsess->_waittocommit--;    }    }
1011:    if(!datarow) {    PD("%O Block for datarow\n",_portalname);    array cid=callout(gottimeout,timeout); -  datarow=datarows->read(); +  PT(datarow=datarows->read());    local_backend->remove_call_out(cid);    if(arrayp(datarow))    return datarow;
1037:    array(array|int) datarow=datarows->try_read_array();    if(!datarow) {    array cid=callout(gottimeout,timeout); -  datarow=datarows->read_array(); +  PT(datarow=datarows->read_array());    local_backend->remove_call_out(cid);    }    if(arrayp(datarow[-1]))
1075:    int|array datarow;    for(;;) {    array cid=callout(gottimeout,timeout); -  datarow=datarows->read(); +  PT(datarow=datarows->read());    local_backend->remove_call_out(cid);    if(!arrayp(datarow))    break;
1105:    array(array|int) datarow;    for(;;) {    array cid=callout(gottimeout,timeout); -  datarow=datarows->read_array(); +  PT(datarow=datarows->read_array());    local_backend->remove_call_out(cid);    if(!datarow || !arrayp(datarow[-1]))    break;