Pgbot:一款 5.9 MB 的只读 Postgres 工具,专为人类和智能体设计。
Pgbot: A 5.9 MB read-only Postgres tool for humans and agents

原始链接: https://pgbot.dev/

连接任何 PostgreSQL 数据库,即可获得有关性能、查询、健康状况、架构和变更的可见性,并辅以 AI 驱动的分析。 01 实时查看数据库健康状况 监控连接、锁、事务、缓存命中率、复制、WAL 以及整体数据库健康状况。 02 理解查询性能 利用 PostgreSQL 统计信息跟踪慢查询、性能回归、吞吐量、查询延迟以及高开销 SQL。 03 检查表和索引 分析表增长、索引使用情况、未使用索引、缺失索引、VACUUM 活动以及存储模式。 04 获取 AI 驱动的洞察 通过自然语言向 pgBot 提问,并根据真实数据库信号获取摘要、解释和建议。 05 适用于任何 PostgreSQL 直接连接公有数据库,或针对 Docker、Kubernetes 和内部服务器等私有环境使用 pgBot Agent。 06 专为安全生产环境构建 提供只读访问权限、开源 Agent,并支持私有化部署,无需将数据库暴露在公网。

**Pgbot** 是一款轻量级(5.9 MB)的开源 Go 二进制工具,旨在供人类和 AI 智能体对 PostgreSQL 数据库进行只读诊断。该工具由工程师 Alex (@sashash) 开发,用户无需构建复杂的遥测堆栈或部署永久监控,即可快速检查数据库健康状况、识别高开销查询,并标记存在风险或未使用的索引。 Pgbot 的核心特性在于其确定性设计:诊断结果通过 Go 代码计算得出,而非由大语言模型(LLM)臆造。该工具在设计上严格限制为只读模式,防止对生产环境进行任何意外的 DDL 或 DML 修改。此外,它还支持模型上下文协议(MCP),使 AI 编程智能体能够安全地查询数据库状态。 该项目在 Hacker News 上引发了讨论,部分用户质疑与直接执行 SQL 查询相比,使用中间工具是否有必要。尽管开发者强调了该工具在智能体工作流中的便捷性和安全性,但也有社区成员对其信任度及潜在的遥测问题表示谨慎,并指出其开源代码确保了透明度。目前,开发者正在寻求社区反馈,以改进潜在的误报问题并完善诊断检查功能。
相关文章

原文

Connect any PostgreSQL database and get visibility into performance, queries, health, schema, and changes — with AI-powered explanations.

01

See database health in real time

Monitor connections, locks, transactions, cache hit ratio, replication, WAL, and overall database health.

02

Understand query performance

Track slow queries, regressions, throughput, query latency, and expensive SQL using PostgreSQL statistics.

03

Inspect tables and indexes

Analyze table growth, index usage, unused indexes, missing indexes, vacuum activity, and storage patterns.

04

Get AI-powered insights

Ask pgBot questions in plain English and get summaries, explanations, and recommendations based on real database signals.

05

Works with any PostgreSQL

Connect directly to public databases or use the pgBot Agent for private environments like Docker, Kubernetes, and internal servers.

06

Built for secure production use

Read-only access, open-source agent, and support for private deployments without exposing your database publicly.

联系我们 contact @ memedata.com