Branch: Tag:

2017-07-02

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

pgsql: Stashflushmode is now managed consistently.

152:    return 0; // text   }    - private int mergemode(conxion realbuffer,int mode) { -  if(mode>realbuffer->stashflushmode) -  realbuffer->stashflushmode=mode; -  return realbuffer->stashflushmode; - } -  +    private inline mixed callout(function(mixed ...:void) f,    float|int delay,mixed ... args) {    return local_backend->call_out(f,delay,@args);
204:    }    }    realbuffer->stash->add(this); -  mergemode(realbuffer, mode); +  PD("%d>Got stash mode %d > %d\n", +  realbuffer->socket->query_fd(), mode, realbuffer->stashflushmode); +  if (mode > realbuffer->stashflushmode) +  realbuffer->stashflushmode = mode;    if(!--realbuffer->stashcount)    realbuffer->stashavail.signal();    lock=0;
349:    qportals->write(synctransact++);    else    queueup(portal); -  mode = mergemode(this, mode); +  PD("%d>Got stash mode %d > %d\n", +  socket->query_fd(), stashflushmode, mode); +  if (stashflushmode > mode) +  mode = stashflushmode;    stashflushmode = KEEP;    }    return mode;
391:    case FLUSHSEND:    PD("Flush\n");    add(PGFLUSH); -  case SYNCSEND: +     case SENDOUT:;    }    if(towrite=sizeof(this)) {