Branch: Tag:

2014-11-28

2014-11-28 02:29:10 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Timeout queries only when needed.

482:   //! through the generic SQL-interface.   /*semi*/final int settimeout(void|int newtimeout) {    int oldtimeout=timeout; -  if(!undefinedp(newtimeout) && newtimeout>0) { +  if(!undefinedp(newtimeout) && newtimeout>0)    timeout=newtimeout; -  if(c) -  c->timeout=timeout; -  } +     return oldtimeout;   }   
697:    case 0:    PD("Ok\n");    .pgsql_util.local_backend->remove_call_out(reconnect); -  cr->gottimeout=cancelquery; -  cr->timeout=timeout; +     reconnectdelay=0;    cancelsecret="";    break;
1871:    tp=UNDEFINED;    .pgsql_util.sql_result portal;    portal=.pgsql_util.sql_result(this,c,q, -  portalbuffersize,_alltyped,from,forcetext); +  portalbuffersize,_alltyped,from,forcetext,timeout);    portal._tprepared=tp;   #ifdef PG_STATS    portalsopened++;