On Fri, Apr 3, 2020 at 11:50 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > (2) It only wins if a statement timeout is active, otherwise it makes > things worse, because then you need setitimer() at statement start > and end just to enable/disable the socket check timeout. Whereas > if you just let a once-a-minute timeout continue to run, you don't > incur those kernel calls.
Oh, that's a really good point. I should have thought of that. > Anyway, the core problem with the originally-submitted patch was that > it was totally ignorant that timeout.c had restrictions it was breaking. > You can either fix the restrictions, or you can try to design around them, > but you've got to be aware of what that code can and can't do today. No disagreement there. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company