Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQBvM-001LbW-1c for pgsql-announce@arkaria.postgresql.org; Thu, 21 May 2026 22:31:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQBvK-00BfK7-1f for pgsql-announce@arkaria.postgresql.org; Thu, 21 May 2026 22:31:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQBqx-00BU6Q-0P for pgsql-announce@lists.postgresql.org; Thu, 21 May 2026 22:26:56 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wQBqr-00000000AD7-2ski for pgsql-announce@lists.postgresql.org; Thu, 21 May 2026 22:26:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:From:To:Subject: MIME-Version:Content-Type:Sender:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=FafRrOub+nJa5blFK79A4ZwIW9ANVs/PDgoLScFzEQc=; b=AkxMBLQUirjQJ2l3qYsiSPOChS VT6Q//DH1dK85085sh9Sd+Q1oS3SaLjh7PECUVuUWDNI8TncI2VEFqKUYTHJROwtebyZRJ6JZPrbN v/nkIbJZWwTKQ6j5MBUCh1/GFSM1Im2gZ0qMxpKl8PyCuSNOd49RT54O+B0FOzIX8Oz+Sobhcvkgb iW8cbinZw7PYTpCZ/xSxWRSIsc4vGXywPzmcA1gy6VQwgZL/J/6fRmUypMxDqV0EglQc4lASuNTEZ EYEXDXuHNBz/AhxYUrvCsfsAhvL63VlK1SFU7YaV2Egv9dZnxUebR4AxSjAxHdynL/0/abiEsnRyU iihzrIdA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQBql-000VI8-2h for pgsql-announce@lists.postgresql.org; Thu, 21 May 2026 22:26:49 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQBZe-004I3T-2f for pgsql-announce@lists.postgresql.org; Thu, 21 May 2026 22:09:02 +0000 Content-Type: multipart/alternative; boundary="===============1966724685867975850==" MIME-Version: 1.0 Subject: pg_statviz 1.0 released with AI-powered analysis To: PostgreSQL Announce From: pg_statviz project via PostgreSQL Announce Reply-To: vyruss@hellug.gr Date: Thu, 21 May 2026 22:09:00 +0000 Message-ID: <177940134000.801.7194156205545717490@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-pglister-tags: related X-pglister-tagsig: 4f94864744096e7ccc724e59ca0673b9cdb9cbb981c7927aa42623b296753c35 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --===============1966724685867975850== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Excited to announce **[release 1.0](https://github.com/vyruss/pg_statviz/re= leases/tag/v1.0)** of **[`pg_statviz`](https://github.com/vyruss/pg_statviz= /)**, the minimalist extension and utility pair for time series analysis an= d visualization of PostgreSQL internal statistics. This is a major release that introduces a new optional capability: **AI-pow= ered analysis**. With the new `--ai` flag, each chart's data and PNG are se= nt to a vision-capable LLM along with Senior PostgreSQL DBA-level context, = and the model produces a **[HEALTHY] / [WARNING] / [CRITICAL]** verdict, a = short interpretation, and a concrete remediation step for any [WARNING] or = [CRITICAL] finding. Reports are written as HTML pages, created alongside th= e chart PNGs, with a top-level `index.html` synthesising the per-module fin= dings into a single summary. The new features: - **Three AI providers, one flag**: `--ai claude` for Anthropic Claude (the= default), `--ai gemini` for Google AI Studio's free-tier Gemini 2.5 Flash,= and `--ai local` for an [Ollama](https://ollama.com/) instance running a v= ision-capable model such as `gemma4:e4b` (the recommended local default). A= ll three are entirely optional: `pg_statviz` still installs and runs with z= ero AI dependencies, and the new `[ai]` extra (`pip install pg_statviz[ai]`= ) pulls in only what you ask for. - **Per-module HTML reports** embed each chart PNG and render the LLM's mar= kdown analysis with status badges and styled paragraphs. A new top-level `i= ndex.html` report aggregates per-chart verdicts and asks the model to **syn= thesise** them, identifying correlated patterns across charts (for example,= a WAL spike alongside long-running sessions) and surfacing the single most= important next action. - **Deterministic rules engine** runs checks on the actual numeric data bef= ore the LLM call. Findings are injected into the prompt as additional conte= xt, and a **severity floor** enforces that the final verdict can never be d= owngraded below the worst rule finding, so an overly optimistic LLM can't q= uietly hide a real problem. - **Configuration-aware prompts**: the relevant `pg_settings` for each char= t (`shared_buffers` and `bgwriter_*` for buffers, `checkpoint_*` and `max_w= al_size` for checkpoints, `max_connections` for connections, etc.) are pull= ed from the captured config snapshot and rendered into the per-module promp= t, so the model's advice is grounded in your actual server rather than gene= ric folklore. - **Calibration block** in the system prompt explicitly debunks common Post= greSQL myths (the *"25% of RAM for shared_buffers"* rule of thumb, the defa= ult `random_page_cost=3D4`, naive `work_mem =C3=97 max_connections` arithme= tic) so the model doesn't recommend changes that aren't really warranted. - **Prompt-injection containment**: every piece of user-derived data is wra= pped in `...` envelopes, and the system prompt instr= ucts the model never to treat that content as instructions. This makes the = analysis robust against unexpected values in configuration, role names, slo= t names, query text, or anywhere else. This release also includes some **maintenance and optimizations**: - The `analyze` orchestrator now gracefully continues if a single module fi= nds no snapshot data, instead of aborting the whole run at that point. - Test fixes for the I/O rate calculations and added coverage for the new A= I functionality. `pg_statviz` takes the view that everything should be light and **minimal**= . Unlike commercial monitoring platforms, it doesn't require invasive agent= s or open connections to the database: it all lives inside your database. The extension is plain SQL and PL/pgSQL and doesn't require modules to be l= oaded, the visualization utility is separate and can be run from anywhere, = and your data is free and easy to export. The new AI analysis is **fully op= tional** and opt-in: if you don't pass `--ai`, `pg_statviz` behaves exactly= as before, with no extra dependencies and no calls to anything outside you= r machine. `pg_statviz` only collects PostgreSQL internal statistics and metadata: no = application data. However, be aware that if you use a third-party API rathe= r than a local LLM, you are effectively uploading those statistics to someo= ne else's server, with the security and privacy implications that may have,= and the LLM provider's terms of use probably permit using your input for f= urther training of their product. If you want strict local-only operation, = use `--ai local`. - You can download and install `pg_statviz` from the PostgreSQL repositorie= s or [PGXN](https://pgxn.org/dist/pg_statviz/). - The utility can also be installed from [PyPi](https://pypi.org/project/pg= _statviz/); for the AI features use `pip install pg_statviz[ai]`. - [Manual installation](https://github.com/vyruss/pg_statviz/tree/master?ta= b=3Dreadme-ov-file#manual-installation) is also possible. --===============1966724685867975850== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable pg_statviz 1.0 released with AI-powered analysis
 

pg_statviz 1.0 released with AI-powered analysis

Excited to announce release 1.0 of pg_statviz, the minimalist e= xtension and utility pair for time series analysis and visualization of Pos= tgreSQL internal statistics.

This is a major release that introduces a n= ew optional capability: AI-powered analysis. With the new = --ai flag, each chart's data and PNG are sent to a vision-capa= ble LLM along with Senior PostgreSQL DBA-level context, and the model produ= ces a [HEALTHY] / [WARNING] / [CRITICAL] verdict, a short = interpretation, and a concrete remediation step for any [WARNING] or [CRITI= CAL] finding. Reports are written as HTML pages, created alongside the char= t PNGs, with a top-level index.html synthesising the per-modul= e findings into a single summary.

The new features:

  • Three A= I providers, one flag: --ai claude for Anthropic Clau= de (the default), --ai gemini for Google AI Studio's free-tier= Gemini 2.5 Flash, and --ai local for an Ollama = instance running a vision-capable model such as gemma4:e4b (th= e recommended local default). All three are entirely optional: pg_sta= tviz still installs and runs with zero AI dependencies, and the new = [ai] extra (pip install pg_statviz[ai]) pulls in = only what you ask for.
  • Per-mod= ule HTML reports embed each chart PNG and render the LLM's markdow= n analysis with status badges and styled paragraphs. A new top-level = index.html report aggregates per-chart verdicts and asks the model t= o synthesise them, identifying correlated patterns across = charts (for example, a WAL spike alongside long-running sessions) and surfa= cing the single most important next action.
  • Determi= nistic rules engine runs checks on the actual numeric data before = the LLM call. Findings are injected into the prompt as additional context, = and a severity floor enforces that the final verdict can n= ever be downgraded below the worst rule finding, so an overly optimistic LL= M can't quietly hide a real problem.
  • Configu= ration-aware prompts: the relevant pg_settings for ea= ch chart (shared_buffers and bgwriter_* for buffe= rs, checkpoint_* and max_wal_size for checkpoints= , max_connections for connections, etc.) are pulled from the c= aptured config snapshot and rendered into the per-module prompt, so the mod= el's advice is grounded in your actual server rather than generic folklore.=
  • Calibra= tion block in the system prompt explicitly debunks common PostgreS= QL myths (the "25% of RAM for shared_buffers" rule of thumb, the d= efault random_page_cost=3D4, naive work_mem =C3=97 max_c= onnections arithmetic) so the model doesn't recommend changes that a= ren't really warranted.
  • Prompt-= injection containment: every piece of user-derived data is wrapped= in <user_data>...</user_data> envelopes, and the = system prompt instructs the model never to treat that content as instructio= ns. This makes the analysis robust against unexpected values in configurati= on, role names, slot names, query text, or anywhere else.

This release also includes some mai= ntenance and optimizations:

  • The analy= ze orchestrator now gracefully continues if a single module finds no= snapshot data, instead of aborting the whole run at that point.
  • Test fixes for = the I/O rate calculations and added coverage for the new AI functionality.<= /li>

pg_statviz takes the view that= everything should be light and minimal. Unlike commercial= monitoring platforms, it doesn't require invasive agents or open connectio= ns to the database: it all lives inside your database. The extension is plain SQL and PL/pgSQL and doesn't require modules to be l= oaded, the visualization utility is separate and can be run from anywhere, = and your data is free and easy to export. The new AI analysis is fu= lly optional and opt-in: if you don't pass --ai, pg_statviz behaves exactly as before, with no extra dependencies a= nd no calls to anything outside your machine.

pg_statviz only collects Postg= reSQL internal statistics and metadata: no application data. However, be aw= are that if you use a third-party API rather than a local LLM, you are effe= ctively uploading those statistics to someone else's server, with the secur= ity and privacy implications that may have, and the LLM provider's terms of= use probably permit using your input for further training of their product= . If you want strict local-only operation, use --ai local.

  • You can downloa= d and install pg_statviz from the PostgreSQL repositories or <= a href=3D"https://pgxn.org/dist/pg_statviz/" style=3D"color: #3498db; text-= decoration: underline">PGXN.
  • The utility can= also be installed from PyPi; for the AI fea= tures use pip install pg_statviz[ai].
  • Manual ins= tallation is also possible.
This email was sent to you from pg_statviz project. It was delivered on the= ir behalf by the PostgreSQL project. Any questions about the content of the message shou= ld be sent to pg_statviz project.

You were sent this email as a subscriber of the pgsql-announce mai= linglist, for the content tag Related Open Source. To unsubscribe from further emails, or change which emails you want to receive, please click th= e personal unsubscribe link that you can find in the headers of this email, or visit https://lists.postgresql.org/unsubscribe/.
 
--===============1966724685867975850==--