The author of the text, a CARTO user, was facing challenges with parallel query support in PostgreSQL 10 and PostGIS 2.4 for spatial queries, which were not optimized to take advantage of parallel processing. To improve performance, the authors had to tweak both packages, including modifying the PostgreSQL planner to generate more aggressive parallel plans with PostGIS functions and adding higher costs to PostGIS functions to capture their high computational complexity. However, this process was not without its challenges, as some spatial functions were modified to be compatible with parallel processing, but others required adjustments to maintain compatibility with existing inlining behavior. The authors ultimately applied patches to their PostgreSQL 10 and PostGIS 2.4 forks to achieve the desired performance improvements.