Conference Schedule - PGCon 2023

PGTracer: A tracing tool for Postgres backends

Date: 2023-06-01
Time: 10:00–10:45
Room: DMS 1160
Level: Intermediate

Many DBAs are familiar with linux perf utility, but what if instead of sampling random stack traces we could trace full queries, their execution plans, transactions ? In this talk I will present a new open-source tool, inspired by perf but focused on Postgres.

The tool is built on the linux kernel’s eBPF facility, using trace and perf events, and allows to capture and instrument whole queries down to the individual execution nodes. DBAs and developers interested in profiling could use the tool to capture, without any modification to PostgreSQL itself, interesting information like: IO access, syscalls and specific counters at the query or node level. It has the ability to dump queries running in a backend, live, as well as their execution plans.

We’ll cover what the challenges are when working with EBPF, and many new ideas on how to understand what is happening in a PostgreSQL backend, in the kernel or other libraries that it uses.

link to video


Ronan Dunklau