RFC-0053 PostgreSQL security evidence
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
This is a trace and gap record from the pinned draft specification. It does not establish proof or implementation conformance.
Observed 2026-10-05 against PostgreSQL 14.24 (Homebrew, aarch64 Darwin). Owners: Storage, Security, Compiler. No normative contracts changed.
Reproduction
The checked-in SQL probe creates its own objects in a disposable database. Run it only against a fresh test database, with a database administrator role. It intentionally emits two errors; psql exit status alone is not a pass criterion.
python3 tools/check_rfc0053_postgres_evidence.py creates its own disposable
cluster, runs the probe with clean psql startup configuration, verifies both
row counts and DELETE 1, and requires exactly two SQLSTATE 42809 errors.
It reproduced these observations on PostgreSQL 14.24. A cleanup failure
preserves the cluster directory and reports it rather than deleting live files.
This command verifies counterexamples, not the proposed replacement contract.
An isolated temporary cluster used a Unix socket, port 55483, and no TCP listener. It was stopped after the test. No existing database was accessed.
| Probe | Observed result |
|---|---|
| Reader selects RLS-enabled base table | 1 visible row. |
| Same reader selects security_barrier view owned by administrator | 2 rows, including the otherwise hidden row. |
| Reader deletes hidden row through that view without INSTEAD OF trigger | DELETE 1; transaction rolled back. |
| ALTER TABLE native materialized view ENABLE ROW LEVEL SECURITY | SQLSTATE 42809: not a table. |
| CREATE POLICY on native materialized view | SQLSTATE 42809: not a table. |
The example demonstrates that security_barrier alone does not establish the caller RLS context promised by RFC-0053 §5.2. The official CREATE VIEW documentation distinguishes owner context from security_invoker, and describes automatically updatable views with a mix of writable and expression columns. The observed delete contradicts §6.1’s reliance on absent INSTEAD OF triggers for read-only behavior. This is a focused PostgreSQL test, not an end-to-end Gnomon exploit.
The native materialized-view SQL in §5.3 fails on the tested server. A cached ordinary table with policies is a different physical representation and must be specified explicitly. PostgreSQL documents separate materialized-view commands and table policies. These documentation links are version 18; the runtime observations above are version 14.24 and do not establish a complete supported-version matrix.
Required disposition
- Select the supported PostgreSQL version range and an explicit caller policy context, including view owner, base-table grants, bypass privileges, and any security_invoker requirement.
- Enforce read-only view access with explicit privileges or another specified mechanism; absence of write-through triggers is insufficient.
- Choose a real policy-bearing cache table or another defined authorization boundary for materialized results. Do not emit unsupported RLS statements on native materialized views.
- Test owner, ordinary reader, cross-tenant reader, and privileged roles; include SELECT, DELETE, updates to simple columns, computed-column writes, and cached-result authorization after permission changes.
The source-bound RDF review can report agreement with an authored assertion while this evidence disproves its database assumption. Normative publication requires both source consistency and executable conformance.