PgCuckoo – Injecting Physical Plans into PostgreSQL

Denis Hirn

Proceedings of the 18th Conference on Database Systems for Business, Technology, and Web (BTW 2019), Rostock, Germany, March 2019.


Plan forcing is the most capable plan hinting that a database system can implement. It allows the specification of almost every aspect of an execution plan. The open source database system PostgreSQL does not implement any plan hints by default. We will show how an extension can be used to provide plan forcing for PostgreSQL. This extension allows to use the query executor directly and independently of SQL. We sketch some of the interesting use case scenarios for plan forcing in PostgreSQL.