<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: bertrand HARTWIG</title>
    <description>The latest articles on DEV Community by bertrand HARTWIG (@bertrand_hartwig_309d1958).</description>
    <link>https://dev.to/bertrand_hartwig_309d1958</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1915824%2Fb0620e35-b10d-46de-9781-576785aba401.jpg</url>
      <title>DEV Community: bertrand HARTWIG</title>
      <link>https://dev.to/bertrand_hartwig_309d1958</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bertrand_hartwig_309d1958"/>
    <language>en</language>
    <item>
      <title>pgAssistant 2.8 — Deterministic PostgreSQL Analysis with the new Global Advisor</title>
      <dc:creator>bertrand HARTWIG</dc:creator>
      <pubDate>Fri, 08 May 2026 06:01:15 +0000</pubDate>
      <link>https://dev.to/bertrand_hartwig_309d1958/pgassistant-28-deterministic-postgresql-analysis-with-the-new-global-advisor-ig4</link>
      <guid>https://dev.to/bertrand_hartwig_309d1958/pgassistant-28-deterministic-postgresql-analysis-with-the-new-global-advisor-ig4</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vzi2hozpxzikvsrko15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vzi2hozpxzikvsrko15.png" alt="Global Advisor" width="800" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the past months, I have been working on a simple idea around PostgreSQL tooling:&lt;/p&gt;

&lt;p&gt;before using AI, start with deterministic analysis.&lt;/p&gt;

&lt;p&gt;This is the direction behind &lt;strong&gt;pgAssistant 2.8&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This release introduces a new component called Global Advisor, alongside many improvements around ranking, schema analysis, maintenance diagnostics, and index recommendations.&lt;/p&gt;

&lt;p&gt;The project remains open-source and focused on practical PostgreSQL analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is pgAssistant?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;pgAssistant is an open-source PostgreSQL analysis tool.&lt;/p&gt;

&lt;p&gt;It helps developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;inspect database structures&lt;/li&gt;
&lt;li&gt;analyze execution plans&lt;/li&gt;
&lt;li&gt;detect schema and maintenance issues&lt;/li&gt;
&lt;li&gt;review indexes and foreign keys&lt;/li&gt;
&lt;li&gt;understand PostgreSQL behavior more easily&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deterministic analysis&lt;/li&gt;
&lt;li&gt;execution-plan analysis (EXPLAIN ANALYZE)&lt;/li&gt;
&lt;li&gt;optional AI-assisted reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to replace PostgreSQL expertise.&lt;br&gt;
The goal is simply to make PostgreSQL diagnostics more accessible and more contextual.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main addition in 2.8: Global Advisor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before pgAssistant 2.8, most checks existed independently.&lt;/p&gt;

&lt;p&gt;Now they are consolidated into a single entry point:&lt;/p&gt;

&lt;p&gt;Global Advisor&lt;/p&gt;

&lt;p&gt;The Global Advisor performs a database-wide deterministic analysis and aggregates findings into a unified recommendation list.&lt;/p&gt;

&lt;p&gt;Each recommendation now includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a rank&lt;/li&gt;
&lt;li&gt;a confidence score&lt;/li&gt;
&lt;li&gt;an estimated impact&lt;/li&gt;
&lt;li&gt;an estimated implementation effort&lt;/li&gt;
&lt;li&gt;a suggested SQL statement when relevant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wtwlmm1kr3jvkxv78jr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wtwlmm1kr3jvkxv78jr.png" alt="Global Advisor" width="800" height="536"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The objective is not to claim certainty.&lt;/p&gt;

&lt;p&gt;It is to help prioritize investigations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic first&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One important design choice in pgAssistant is that the Global Advisor is intentionally deterministic.&lt;/p&gt;

&lt;p&gt;The analysis is based directly on PostgreSQL catalogs and statistics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pg_stat_user_tables&lt;/li&gt;
&lt;li&gt;pg_stat_user_indexes&lt;/li&gt;
&lt;li&gt;pg_constraint&lt;/li&gt;
&lt;li&gt;pg_index&lt;/li&gt;
&lt;li&gt;pg_settings&lt;/li&gt;
&lt;li&gt;pg_stats&lt;/li&gt;
&lt;li&gt;execution plans&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;same input → same output&lt;/li&gt;
&lt;li&gt;no hallucinations&lt;/li&gt;
&lt;li&gt;explainable findings&lt;/li&gt;
&lt;li&gt;reproducible analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI is still supported as an optional layer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlg8zpf1fk1y2iap2ggw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlg8zpf1fk1y2iap2ggw.png" alt="Query Advisor" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of checks now included&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Global Advisor currently includes checks such as:&lt;/p&gt;

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

&lt;p&gt;Most recommendations also include suggested SQL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query analysis is still there&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The query advisor based on real EXPLAIN ANALYZE plans remains a core part of pgAssistant.&lt;/p&gt;

&lt;p&gt;The idea is now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Global Advisor → broad database analysis&lt;/li&gt;
&lt;li&gt;Query Advisor → detailed query-level investigation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two approaches complement each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI support remains optional.&lt;/p&gt;

&lt;p&gt;pgAssistant can work entirely without an LLM.&lt;/p&gt;

&lt;p&gt;When enabled, AI features receive contextual PostgreSQL information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;schema definitions&lt;/li&gt;
&lt;li&gt;indexes&lt;/li&gt;
&lt;li&gt;execution plans&lt;/li&gt;
&lt;li&gt;statistics&lt;/li&gt;
&lt;li&gt;database settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This significantly improves the relevance of generated suggestions compared to generic SQL prompting.&lt;/p&gt;

&lt;p&gt;Supported providers currently include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ollama&lt;/li&gt;
&lt;li&gt;OpenAI-compatible APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why I built it this way&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A lot of PostgreSQL tooling focuses on metrics dashboards.&lt;/p&gt;

&lt;p&gt;Those tools are useful, but I often felt there was still a gap between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;seeing a metric&lt;/li&gt;
&lt;li&gt;understanding the cause&lt;/li&gt;
&lt;li&gt;deciding what to change&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pgAssistant tries to reduce that gap.&lt;/p&gt;

&lt;p&gt;The project is still evolving, but the Global Advisor is an important step toward a more coherent analysis workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live demo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A public demo is available here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ov-004f8b.infomaniak.ch/" rel="noopener noreferrer"&gt;https://ov-004f8b.infomaniak.ch/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo connection:&lt;/p&gt;

&lt;p&gt;postgresql://postgres:demo@demo-db:5432/northwind&lt;/p&gt;

&lt;p&gt;The public demo intentionally runs without AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/beh74/pgassistant-community" rel="noopener noreferrer"&gt;https://github.com/beh74/pgassistant-community&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="https://beh74.github.io/pgassistant-blog/" rel="noopener noreferrer"&gt;https://beh74.github.io/pgassistant-blog/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker image: &lt;a href="https://hub.docker.com/r/bertrand73/pgassistant" rel="noopener noreferrer"&gt;https://hub.docker.com/r/bertrand73/pgassistant&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Feedback welcome&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project is still evolving and many parts can certainly be improved.&lt;/p&gt;

&lt;p&gt;If you work with PostgreSQL and have ideas, feedback, or criticisms, feel free to open an issue or discussion on GitHub.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>database</category>
      <category>opensource</category>
      <category>postgres</category>
      <category>tooling</category>
    </item>
    <item>
      <title>pgAssistant v1.7 released</title>
      <dc:creator>bertrand HARTWIG</dc:creator>
      <pubDate>Sat, 01 Feb 2025 13:09:19 +0000</pubDate>
      <link>https://dev.to/bertrand_hartwig_309d1958/pgassistant-v17-released-3309</link>
      <guid>https://dev.to/bertrand_hartwig_309d1958/pgassistant-v17-released-3309</guid>
      <description>&lt;p&gt;I'm excited to share that we just released &lt;strong&gt;pgAssistant&lt;/strong&gt; v1.7.&lt;/p&gt;

&lt;p&gt;PGAssistant is an open-source tool designed to help &lt;strong&gt;developers&lt;/strong&gt; gain deeper insights into their PostgreSQL databases and optimize performance efficiently.&lt;/p&gt;

&lt;p&gt;It analyzes database behavior, detects schema-related issues, and provides actionable recommendations to resolve them.&lt;/p&gt;

&lt;p&gt;One of the goals of PGAssistant is to help developers optimize their database and fix potential issues on their own before needing to seek assistance from a DBA.&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;AI-Powered Optimization:&lt;/strong&gt; PGAssistant leverages AI-driven language models like ChatGPT, Claude, and on-premise solutions such as Ollama to assist developers in refining complex queries and enhancing database efficiency.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/nexsol-technologies/pgassistant" rel="noopener noreferrer"&gt;PGAssistant&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Easy Deployment with Docker:&lt;/strong&gt; PGAssistant is Docker-based, making it simple to run. Get started effortlessly using the provided &lt;a href="https://github.com/nexsol-technologies/pgassistant/blob/main/docker-compose/docker-compose.yml" rel="noopener noreferrer"&gt;Docker Compose file&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’d love to hear your feedback! If you find PGAssistant useful, feel free to contribute or suggest new features. Let’s make PostgreSQL database easy for dev Teams !&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>postgressql</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
    <item>
      <title>pgAssistant - postgesql tool 4 dev</title>
      <dc:creator>bertrand HARTWIG</dc:creator>
      <pubDate>Mon, 12 Aug 2024 05:00:03 +0000</pubDate>
      <link>https://dev.to/bertrand_hartwig_309d1958/pgassistant-postgesql-tool-4-dev-16cp</link>
      <guid>https://dev.to/bertrand_hartwig_309d1958/pgassistant-postgesql-tool-4-dev-16cp</guid>
      <description>&lt;p&gt;I wrote this small tool because I noticed that our young developers were struggling to understand the behavior of their PostgreSQL database, and therefore had even more difficulty optimizing their databases. &lt;/p&gt;

&lt;p&gt;Gradually, developers started using it, and the tool helped the development teams become much more autonomous, and me much less solicited. &lt;/p&gt;

&lt;p&gt;Feel free to use it and give me your feedback. &lt;/p&gt;

&lt;p&gt;I try to enhance the application whenever time allows.&lt;/p&gt;

&lt;p&gt;You can find it there : &lt;a href="https://github.com/nexsol-technologies/pgassistant" rel="noopener noreferrer"&gt;https://github.com/nexsol-technologies/pgassistant&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>postgres</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
