Re: [HACKERS] Avoiding overflow in timeout-related calculations

2012-11-18 Thread Andres Freund
On 2012-11-18 15:21:34 -0500, Tom Lane wrote: > Andres Freund writes: > > I think at least wal_sender_timeout and wal_receiver_timeout are also > > problematic. > > I looked at those and didn't see a problem --- what are you worried > about exactly? Forget it, too hungry to read the code properl

Re: [HACKERS] Avoiding overflow in timeout-related calculations

2012-11-18 Thread Tom Lane
Andres Freund writes: > I think at least wal_sender_timeout and wal_receiver_timeout are also > problematic. I looked at those and didn't see a problem --- what are you worried about exactly? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postg

Re: [HACKERS] Avoiding overflow in timeout-related calculations

2012-11-18 Thread Andres Freund
On 2012-11-18 14:57:51 -0500, Tom Lane wrote: > The discussion of bug #7670 showed that what's happening there is that > if you specify a log_rotation_age of more than 25 days (2^31 msec), > WaitLatch will sometimes be passed a timeout of more than 2^31 msec, > leading to unportable behavior. At l

[HACKERS] Avoiding overflow in timeout-related calculations

2012-11-18 Thread Tom Lane
The discussion of bug #7670 showed that what's happening there is that if you specify a log_rotation_age of more than 25 days (2^31 msec), WaitLatch will sometimes be passed a timeout of more than 2^31 msec, leading to unportable behavior. At least some kernels will return EINVAL for that, and it'