• Tom Lane's avatar
    Use WaitLatch, not pg_usleep, for delaying in pg_sleep(). · a64ca63e
    Tom Lane authored
    This avoids platform-dependent behavior wherein pg_sleep() might fail to be
    interrupted by statement timeout, query cancel, SIGTERM, etc.  Also, since
    there's no reason to wake up once a second any more, we can reduce the
    power consumption of a sleeping backend a tad.
    
    Back-patch to 9.3, since use of SA_RESTART for SIGALRM makes this a bigger
    issue than it used to be.
    a64ca63e
misc.c 14.7 KB