On Fri, Apr 3, 2020 at 10:34 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > In general I think the threshold problem for a patch like this will be > "how do you keep the added overhead down". As Robert noted upthread, > timeout.c is quite a bit shy of being able to handle timeouts that > persist across statements. I don't think that there's any fundamental > reason it can't be improved, but it will need improvements.
Why do we need that? If we're not executing a statement, we're probably trying to read() from the socket, and we'll notice if that returns 0 or -1. So it seems like we only need periodic checks while there's a statement in progress. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company