Tom,

I just checked the version I'm running (9.1.6), and the code is quite similar (src/backend/storage/lmgr/s_lock.c)

            pg_usleep(cur_delay * 1000L);

#if defined(S_LOCK_TEST)
            fprintf(stdout, "*");
            fflush(stdout);
#endif

            /* increase delay by a random fraction between 1X and 2X */
            cur_delay += (int) (cur_delay *
((double) random() / (double) MAX_RANDOM_VALUE) + 0.5);
            /* wrap back to minimum delay when max is exceeded */
            if (cur_delay > MAX_DELAY_MSEC)
                cur_delay = MIN_DELAY_MSEC;

-- vlad




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to