Branch: Tag:

2017-07-02

2017-07-02 00:01:30 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Improve debugging log.

1215:    }    break;    } -  PD("Closing database processloop %O\n",err); +  PD("Closing database processloop %s\n", err ? describe_backtrace(err) : "");    _delayederror=err;    if (objectp(portal)) {    #ifdef PG_DEBUG
1234:    if (err) {    unnamedstatement=0;    termlock = 0; -  throw(err); +  PD("Terminating processloop due to %s\n", describe_backtrace(err));    }   }   
1251:    catch(cancelquery());    if (unnamedstatement)    termlock = unnamedstatement->lock(1); +  if (c) // Prevent trivial backtraces    c->close();    if (unnamedstatement)    lock = unnamedstatement->lock(1); -  +  if (c)    destruct(c);    lock = 0;    destruct(waitforauthready);