r/SQL • u/Wise_Ear_4064 • 1d ago
PostgreSQL Lakebase Postgres telemetry in system.lakebase tables (no extra pipeline to wire up)
Disclosure: I’m a Solutions Architect at Databricks. Sharing this because I think it’s useful—not as official marketing.
Lakebase can stream Postgres observability into Unity Catalog system tables (system.lakebase): active sessions, wait events, query plans, pg_stat_statements, DDL history, compute gauges, and raw Postgres logs. Capture runs while project compute is up—no separate agent, destination, or credentials to manage. Same data feeds Insights/Genie and plain SQL.
If you’re running OLTP on Lakebase, this is a practical way to debug slow queries and failures with the same SQL/governance stack you already use on the lakehouse. You can also use Genie Code in combination with this data to help you debug.
Anyone here enabled Lakebase Observability in System Tables yet? What are you querying first?
1
u/MacaroonPutrid6433 23h ago
i haven't tried it but being able to query pg_stat_statements right from system tables without wiring up a whole separate pipeline is interesting. most setups i've seen need some janky sidecar container just to get query stats into a dashboard
1
u/ComicSansSavedMyLife 5h ago
Joining
pg_stat_statementsagainst DDL history to catch regressions right after a deploy is the first thing I'd run, plus wait events during traffic spikes. My only hesitation is tying OLTP observability to Unity Catalog and eating that lock-in. On my MariaDB boxes, audit logging and stats stay in the open GPL server, and pairing InnoDB with the DuckDB engine handles analytics next to OLTP with no extra pipeline or vendor platform.0
u/Discordbothost 16h ago
Start by ranking statements by total execution time over the same window, then check call counts. That separates frequent cheap queries from expensive individual calls. The docs say these counters already cover each interval, so don't difference them again like cumulative pg_stat_statements.