I don't recall the details, but I know v12 included significant enhancements to lock relations later in the process such that when targeting relatively few of the partitions, it can be a major performance boost.
- Partitioned tables and locks James Sewell
- Re: Partitioned tables and locks Tom Lane
- Re: Partitioned tables and locks James Sewell
- Re: Partitioned tables and locks Michael Lewis