Hi!
Please check the following proposal (patch in attach).
The main idea is to reject only obviously worse paths (costs considerably more
than compared one), and to pass pre-calculated startup cost to precheck function
for more accurate comparison.
Attachment:
v1-0001-ppath-precheck.patch
Description: Binary data