We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Learning to Hack on Postgres Planner

Formal Metadata

Title
Learning to Hack on Postgres Planner
Alternative Title
Intro to Postgres Planner Hacking
Title of Series
Number of Parts
35
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
his talk will cover the process of debugging a bad plan starting from the explain output through hacking in a fix and recompiling the database. Topics covered will include: characteristics of a plan and how these map to components in Postgres code, strategies for producing a minimal repro, simple heuristics for developing a reference plan, using the debugger along with several GUCs to examine the plan tree throughout planning, and, finally, adding in your own code. The intro to query optimization topics covers the basic stages of planning and how those are represented in the form of a query tree and, ultimately, plan tree in Postgres' query optimizer. The case study uses a simple example of a "bad" plan to show how to determine where to add code to modify the behavior of planner. The first few and last slide will be used to discuss how people learned to hack on Postgres planner and what most helped them.