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
Delay lock acquisition for partitions until we route a tuple to them.
Instead of locking all partitions to which we might route a tuple atexecutor startup, just lock them as we use them. In some cases such apartition might get locked at executor startup anyway because itappears in the query's range table for some other reason, but in othercases this is a bit savings.This changes the order in which partitions are locked in some cases,which might conceivably create deadlock hazards that don't existtoday, but per discussion, it seems like such cases should be rareenough that we can neglect them in favor of improving performance.David Rowley, reviewed and tested by Tomas Vondra, Sho Kato, JohnNaylor, Tom Lane, and me.Discussion:http://postgr.es/m/CAKJS1f-=FnMqmQP6qitkD+xEddxw22ySLP-0xFk3JAqUX2yfMw@mail.gmail.com