You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Associate WaitEventSet with postgres_fdw connection.
Instead of epoll_create/close every single time we wait for foreign server in
pgfdw_get_result, reuse WaitEventSet during the lifetime of the connection,
removing this bottleneck.
We have to pass around ConnCacheEntry around instead of plain pq connection for
that, so changes are not that small. On the other hand, probably we can reuse
this state for session-level prepared statements support.
Another solution would be internal caching of epoll instances in latch.c,
however that's much more invasive and it is not entirely clear when to
invalidate such cache.
We also should probably check other uses WaitLatch/WaitLatchOrSocket for such
bottlenecks.
0 commit comments