diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 351887b133..d294a5a47f 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -4033,9 +4033,9 @@ BackendRun(Port *port) */ random_seed = 0; random_start_time.tv_usec = 0; - /* slightly hacky way to get integer microseconds part of timestamptz */ + /* slightly hacky way to convert timestamptz into integers */ TimestampDifference(0, port->SessionStartTime, &secs, &usecs); - srandom((unsigned int) (MyProcPid ^ usecs)); + srandom((unsigned int) (MyProcPid ^ (usecs << 12) ^ secs)); /* * Now, build the argv vector that will be given to PostgresMain.