<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn" -->

---
title: PostgreSQL, AI Governance, and the C.A.L.M. Platform Test
description: AI governance failures in enterprise settings often originate not at the model layer but in the data layer beneath it. Using a real-world example from a...
canonical: https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PostgreSQL, AI Governance, and the C.A.L.M. Platform Test | daily.dev
og:description: AI governance failures in enterprise settings often originate not at the model layer but in the data layer beneath it. Using a real-world example from a...
og:url: https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn
og:image: https://api.daily.dev/og/posts/LzEqTTzCn.png
og:image:alt: PostgreSQL, AI Governance, and the C.A.L.M. Platform Test
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL, AI Governance, and the C.A.L.M. Platform Test

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 14 min read · 0 upvotes · 0 comments

## Summary

AI governance failures in enterprise settings often originate not at the model layer but in the data layer beneath it. Using a real-world example from a financial services organization, the post introduces the C.A.L.M. framework — Changeability, Assurance, Leverage, Measurability — for evaluating whether a PostgreSQL-based data platform is genuinely enterprise-ready for AI workloads. Each dimension is explored with concrete PostgreSQL patterns: logical replication for governed changeability, Row Level Security for access enforcement, pgvector for inheriting governance in vector retrieval, and pg_stat_statements with pgAudit for observability. The framework surfaces four diagnostic questions technical leaders should answer before approving AI use cases.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9pc>

## Questions this post answers

### How can I make sure AI agents querying pgvector embeddings inherit the same row-level security policies as the structured data they represent?

Store vector embeddings alongside governed structured data in the same PostgreSQL instance and model both under consistent RLS policies. When a customer record is scoped by a tenant isolation policy, the embedding representing that customer inherits the same policy automatically, avoiding a second access control implementation or a separate lineage for structured versus semantic data.

_daily.dev surfaces practical patterns like this for teams designing governed AI retrieval on postgresql._

### Does PostgreSQL row-level security automatically apply to all database roles, including table owners?

No, RLS policies do not apply to table owners or to roles granted the BYPASSRLS attribute, unless the table is also altered with FORCE ROW LEVEL SECURITY. An AI agent role should never inherit ownership or superuser-level privileges on tables it queries, otherwise the policy exists on paper but is not actually enforced in practice.

_developers hardening access control on postgresql track caveats like this before they get caught out._

### Does PostgreSQL logical replication copy schema, indexes, and permissions along with the data to a subscriber?

No, logical replication carries only the data, not schema, indexes, or grants. Row-level security policies, indexes, and permissions on the subscriber side must be created independently since they are not inherited automatically from the source, which matters when building a governed AI-serving data layer alongside a core application without modifying its schema.

_teams building governed replicas off postgresql weigh tradeoffs like this on daily.dev before migrating._

## Similar posts on daily.dev

- [Your PostgreSQL Platform Has Telemetry. Does It Have a Digital Twin?](https://daily.dev/posts/your-postgresql-platform-has-telemetry-does-it-have-a-digital-twin--bgfpua762) · Planet PostgreSQL · 0 upvotes · 0 comments
- [AI is Already in Your Database: The Real Risk is How You Govern Change \| Liquibase](https://daily.dev/posts/ai-is-already-in-your-database-the-real-risk-is-how-you-govern-change-liquibase-arjpdvrqd) · Security Boulevard · 0 upvotes · 0 comments
- [Moving AI apps from prototype to production requires enterprise-grade postgres infrastructure](https://daily.dev/posts/moving-ai-apps-from-prototype-to-production-requires-enterprise-grade-postgres-infrastructure-5b1nwfand) · The New Stack · 1 upvotes · 0 comments
- [Rebuilding the data stack for AI](https://daily.dev/posts/rebuilding-the-data-stack-for-ai-8s5vdavcw) · MIT Technology Review · 1 upvotes · 0 comments
- [What “AI-Ready” Actually Means](https://daily.dev/posts/what-ai-ready-actually-means-9i949wxys) · Planet PostgreSQL · 2 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#big-data](https://daily.dev/tags/big-data), [#ai-governance](https://daily.dev/tags/ai-governance), [#pgvector](https://daily.dev/tags/pgvector)

[View this post on daily.dev](https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PostgreSQL, AI Governance, and the C.A.L.M. Platform Test","url":"https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn"},"datePublished":"2026-07-09T16:49:48.798Z","dateModified":"2026-09-14T07:13:34.191Z","description":"AI governance failures in enterprise settings often originate not at the model layer but in the data layer beneath it. Using a real-world example from a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f22125cda21d8fb6509f08a863c7de3d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f22125cda21d8fb6509f08a863c7de3d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,big-data,ai-governance,pgvector","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"PostgreSQL, AI Governance, and the C.A.L.M. Platform Test"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/postgresql-ai-governance-and-the-c-a-l-m-platform-test-lzeqttzcn#faq","mainEntity":[{"@type":"Question","name":"How can I make sure AI agents querying pgvector embeddings inherit the same row-level security policies as the structured data they represent?","acceptedAnswer":{"@type":"Answer","text":"Store vector embeddings alongside governed structured data in the same PostgreSQL instance and model both under consistent RLS policies. When a customer record is scoped by a tenant isolation policy, the embedding representing that customer inherits the same policy automatically, avoiding a second access control implementation or a separate lineage for structured versus semantic data. daily.dev surfaces practical patterns like this for teams designing governed AI retrieval on postgresql."}},{"@type":"Question","name":"Does PostgreSQL row-level security automatically apply to all database roles, including table owners?","acceptedAnswer":{"@type":"Answer","text":"No, RLS policies do not apply to table owners or to roles granted the BYPASSRLS attribute, unless the table is also altered with FORCE ROW LEVEL SECURITY. An AI agent role should never inherit ownership or superuser-level privileges on tables it queries, otherwise the policy exists on paper but is not actually enforced in practice. developers hardening access control on postgresql track caveats like this before they get caught out."}},{"@type":"Question","name":"Does PostgreSQL logical replication copy schema, indexes, and permissions along with the data to a subscriber?","acceptedAnswer":{"@type":"Answer","text":"No, logical replication carries only the data, not schema, indexes, or grants. Row-level security policies, indexes, and permissions on the subscriber side must be created independently since they are not inherited automatically from the source, which matters when building a governed AI-serving data layer alongside a core application without modifying its schema. teams building governed replicas off postgresql weigh tradeoffs like this on daily.dev before migrating."}}]}
```

