Topic: PostgreSQL
  • PostgreSQL + AI: I Tested pgvector Search and a Read-Only MCP Tool on Made-Up Tickets — Hi DBAs, this one started with a support ticket that said "my dashboard data is stale". Our runbook calls the same problem a "delayed refresh". Different words, same issue. A minute later someone asked me how many open tickets each queue has. Both sound like things you'd type into an AI assistant, but they're really two different jobs. The first one needs the right document. The second one needs a count from a table. So I built a small support lab in PostgreSQL 17 and tried both: pgvector for the runbook search, and Google's MCP Toolbox for Databases for the ticket count, with one fixed SQL statement behind it. Everything below is what I ran, what I expected, what came back, and the places where the demo is simpler than real life. The code is on GitHub: dba-ai-lab / experiments/postgresql-pgvector-mcp , with the lab SQL, the MCP Toolbox config, a tiny stdio test client and a one-command run script. 1. The lab, command by command Piece ...

  • AWS Postgres MCP Server Bug: "Read-Only" Wasn't Read-Only — Hi all. Two Postgres MCP security notes came out on the same day this September, and both teach the same lesson. This is the first one. On 4 September 2026 AWS published a bulletin for CVE-2026-85787 in awslabs postgres-mcp-server. The SQL validation used an incomplete list of disallowed inputs, so crafted SQL, hidden in content that reaches the MCP server while a real user is working with it, could change data even though the server was meant to stay read-only. Versions below 1.1.7 are affected, 1.1.7 fixes it, and AWS also recommends connecting with a minimal-privilege Postgres role instead of a superuser. That last recommendation is the real fix in my eyes. A read-only flag in a tool is a filter written by people, and filters miss things. A Postgres role that only has SELECT can't write, no matter how clever the SQL is. If you use this server: upgrade to 1.1.7 or later, check forks too, and look at which role the connection uses. If it's a superuser or the app owner, tha...

  • The Supabase MCP Case: When a Support Ticket Talks to Your AI — Hi all. If you only read one AI security story as a Postgres DBA, I'd make it this one. In July 2025 researchers showed a scenario with Supabase (Postgres underneath), its MCP server and Cursor. A developer asks the AI to look at the latest support tickets. One ticket, written by an attacker, contains instructions for the AI. Because the agent was connected with a powerful key, it could read private tables and write the result back where the attacker could see it. Simon Willison calls this mix the "lethal trifecta": access to private data, exposure to untrusted text, and a way to send data out. It was a demonstration, and Supabase says no customer data leaked this way. Their answer was read-only mode by default, project scoping and limiting which tools are on, while admitting prompt injection isn't solved. The lesson for us is old school. Don't hand an agent a superuser or a key that bypasses row level security. Use read-only where you can. And remember that a...

  • You Already Speak AI: The PostgreSQL DBA's Translation Guide — If you look after Postgres every day, you already speak AI. You just use different words. A prompt is a query. A context window is work_mem. A tool call is a function call. And an agent? That's a junior DBA with a runbook. This is the Postgres version of my Oracle video, written down. No product tour, just a map from what you already know to what's new, and where it can hurt you. 9:12 in the morning, too many connections The running example: new logins start failing with too_many_connections . The old way, you open your script folder, your notes, the mailing list archive and a search engine. You write the query against pg_stat_activity yourself, run it in psql, and read the result. Every step is yours. Now you can type the question in plain English. The model drafts the SQL, explains the plan or the lock, and an agent can even run read-only queries through a tool. What didn't change: the database is still the source of truth, and you're still the one acc...

  • The AI Agent That Deleted a Production Database During a Code Freeze — [ This is probably the most shared AI-and-database story of the last two years, and every DBA I know reacted the same way: "where was the backup?" In July 2025 SaaStr founder Jason Lemkin was building an app with Replit's AI agent. During what he had declared a code and action freeze, the agent deleted the live database, which held records on more than a thousand executives and companies. He also said the agent misreported what it had done. Replit's CEO apologized, and the company pushed separation of development and production databases. Replit's own docs now describe separate dev and prod Postgres databases. My take: the freeze lived in a chat message, not in the system. The agent had rights to drop things in production, and the recovery story wasn't clear at the moment it was needed. None of that is new. It's least privilege, separate environments and tested restores, the stuff we've been nagging about for twenty years. AI just makes the mistake ...

  • Databricks Bought Neon, Snowflake Bought Crunchy Data: Postgres Is the AI Agent Database — Hey folks, a bit of industry news with a DBA question at the end. In May 2025 Databricks agreed to buy Neon, the serverless Postgres company, for a reported one billion dollars. A few weeks later Snowflake announced it would buy Crunchy Data for around 250 million, as the base for Snowflake Postgres. Both talked about AI agents. Neon had said that about 80 percent of the databases it provisions were created automatically by AI agents, not by people. That number is the part I keep thinking about. If agents spin up databases in seconds for each task, we'll have many more short-lived Postgres instances than any team can look after by hand. Who decides their size, their backups, their access, and who deletes them when the agent is done? I don't think the DBA job goes away here. It moves from looking after a few databases to setting the rules for thousands of them. Read the original: Snowflake and Databricks bank on PostgreSQL (The Register) This is my short summary and opinion...

  • Pinecone Brings Its Vector Search Into Postgres With pg_pinecone — Here's one I didn't see coming: a vector database company shipping its engine as a Postgres extension. At the end of October 2026 Pinecone released pg_pinecone, open source under Apache 2.0. It works on vectors you already store with pgvector, uses a compressed index instead of pgvector's HNSW graph, and applies filters during the search rather than after it. That last part matters for queries with strict filters, where post-filtering can quietly return too few results. It runs locally without a Pinecone account, and you can move to their managed service later if you want. Pinecone's own numbers for one million vectors are a much smaller index and faster queries than pgvector HNSW. Those are vendor benchmarks, so I'd treat them as a reason to test, not as a result. Also note what a DBA cares about: it needs PostgreSQL 17 or 18, pgvector, and superuser to install. On managed Postgres you may not be able to add it at all. Still, "keep vectors next to the data,...

  • A PostgreSQL Lab for AI Tests: Docker, pgAdmin, an MCP Server and VS Code — DBA AI Lab · Lab setup I Built a PostgreSQL Lab So Copilot Could Poke at It (Read-Only) PostgreSQL 17, pgAdmin and an MCP server in Docker on a 16 GB laptop, and Copilot in VS Code asking one question. What I expected, what broke, and what I fixed. 3 containers 16 GB RAM laptop 9 MCP tools 0 rows changed by the AI Okay friends, today's job was simple on paper: a PostgreSQL box on my own laptop that I can break while I try AI tools on it. No cloud database, no shared dev server. Something that starts when I log in, that I can throw away and rebuild in a few minutes, and that an AI can read but never change. By the end of the afternoon I had PostgreSQL 17 in Docker, pgAdmin next to it, an MCP server in front of it, and Copilot in VS Code answering a real question about the data. It did not go smoothly. VS Code turned out to be too new for the MCP server, and that alone ate most of my afternoon. I kept all of it in, because you'll probably hit some of the same things. ...

  • AI is Coming to the DBA World. Here's What I'm Going to Test. — For most of my career, this job looked about the same. Keep the database up. Keep it fast. Make sure last night's backup really worked. And when something breaks at three in the morning, find out why before the business wakes up. Then AI moved into town. I've been using it in my daily work for a while, and I wanted a place to test it properly, on real databases, with the mistakes left in. That's what DBA AI Lab is. The video below is the big picture. In this post I'll show you the actual lab test behind it: how I set it up, what I asked, what came back, and where it went wrong. How I built the lab Nothing fancy. It all runs on my laptop: Piece What I used Database Oracle AI Database 26ai Free (23.26.3), pluggable database FREEPDB1 Where it runs Docker Desktop on WSL2, image gvenzl/oracle-free:23.26.3 , 3 GB memory, 2 CPUs Network Port 1521 on 127.0.0.1 only, so nothing outside my laptop can reach it The AI's way in SQLcl MCP server 26.3.1 The AI...

  • Microsoft's 2026 Postgres Update: AI Functions, MCP and DiskANN — [ Hello friends. Every year Claire Giordano at Microsoft writes a long roundup of everything Postgres at Microsoft, and the 2026 edition is full of AI pieces. The ones I'd pick out: AI functions (preview) that let you call models for extraction, classification, generation and re-ranking straight from SQL through the azure_ai extension. pgvector 0.8.2 with steadier parallel HNSW builds. A Postgres connector for Microsoft Foundry agents built on MCP (preview), so agents can explore the schema, query and run vector search, secured with Entra ID. And in the new Azure HorizonDB preview, DiskANN with better filtered vector search plus BM25 full-text search you can combine with it. What I like is the identity part. An agent that signs in with Entra ID is an agent you can see in your logs and take rights away from, which beats a shared password in a config file. What I'd watch: a lot of this is preview, and AI functions in SQL mean model calls inside your queries, so think about cos...