惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
D
Docker
有赞技术团队
有赞技术团队
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
H
Help Net Security
美团技术团队
MyScale Blog
MyScale Blog
B
Blog RSS Feed
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
G
Google Developers Blog
月光博客
月光博客
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
pgAssistant 2.8 — Deterministic PostgreSQL Analysis with ...
bertrand HAR · 2026-05-08 · via DEV Community

For the past months, I have been working on a simple idea around PostgreSQL tooling:

before using AI, start with deterministic analysis.

This is the direction behind pgAssistant 2.8.

This release introduces a new component called Global Advisor, alongside many improvements around ranking, schema analysis, maintenance diagnostics, and index recommendations.

The project remains open-source and focused on practical PostgreSQL analysis.

What is pgAssistant?

pgAssistant is an open-source PostgreSQL analysis tool.

It helps developers:

  • inspect database structures
  • analyze execution plans
  • detect schema and maintenance issues
  • review indexes and foreign keys
  • understand PostgreSQL behavior more easily

The project combines:

  • deterministic analysis
  • execution-plan analysis (EXPLAIN ANALYZE)
  • optional AI-assisted reasoning

The goal is not to replace PostgreSQL expertise.
The goal is simply to make PostgreSQL diagnostics more accessible and more contextual.

The main addition in 2.8: Global Advisor

Before pgAssistant 2.8, most checks existed independently.

Now they are consolidated into a single entry point:

Global Advisor

The Global Advisor performs a database-wide deterministic analysis and aggregates findings into a unified recommendation list.

Each recommendation now includes:

  • a rank
  • a confidence score
  • an estimated impact
  • an estimated implementation effort
  • a suggested SQL statement when relevant

The objective is not to claim certainty.

It is to help prioritize investigations.

Deterministic first

One important design choice in pgAssistant is that the Global Advisor is intentionally deterministic.

The analysis is based directly on PostgreSQL catalogs and statistics:

  • pg_stat_user_tables
  • pg_stat_user_indexes
  • pg_constraint
  • pg_index
  • pg_settings
  • pg_stats
  • execution plans

This means:

  • same input → same output
  • no hallucinations
  • explainable findings
  • reproducible analysis

AI is still supported as an optional layer.

Examples of checks now included

The Global Advisor currently includes checks such as:

  • missing indexes on foreign keys
  • redundant or duplicate indexes
  • unused indexes
  • invalid indexes
  • datatype inconsistencies on foreign keys
  • tables without primary keys
  • stale statistics
  • tables never vacuumed
  • estimated table bloat
  • excessive index-to-table ratio
  • low foreign key coverage
  • PostgreSQL configuration checks
  • sequences approaching exhaustion

Most recommendations also include suggested SQL.

Query analysis is still there

The query advisor based on real EXPLAIN ANALYZE plans remains a core part of pgAssistant.

The idea is now:

  • Global Advisor → broad database analysis
  • Query Advisor → detailed query-level investigation

These two approaches complement each other.

About AI

AI support remains optional.

pgAssistant can work entirely without an LLM.

When enabled, AI features receive contextual PostgreSQL information:

  • schema definitions
  • indexes
  • execution plans
  • statistics
  • database settings

This significantly improves the relevance of generated suggestions compared to generic SQL prompting.

Supported providers currently include:

  • Ollama
  • OpenAI-compatible APIs

Why I built it this way

A lot of PostgreSQL tooling focuses on metrics dashboards.

Those tools are useful, but I often felt there was still a gap between:

  • seeing a metric
  • understanding the cause
  • deciding what to change

pgAssistant tries to reduce that gap.

The project is still evolving, but the Global Advisor is an important step toward a more coherent analysis workflow.

Live demo

A public demo is available here:

https://ov-004f8b.infomaniak.ch/

Demo connection:

postgresql://postgres:demo@demo-db:5432/northwind

The public demo intentionally runs without AI.

Project links

Feedback welcome

The project is still evolving and many parts can certainly be improved.

If you work with PostgreSQL and have ideas, feedback, or criticisms, feel free to open an issue or discussion on GitHub.

Thanks for reading.