# PostgreSQL RLS: whose rows did the backup preserve? A successful logical export and restore can preserve exactly the rows visible to the exporting role, yet omit rows required by a full-table recovery contract. The default pg_dump guard rejects this risk; --enable-row-security deliberately changes the export scope. Do not describe this as a PostgreSQL corruption bug. ## Reproduce Requires Python 3 standard library, PostgreSQL 16 server and client binaries, and an unprivileged OS user. No production server, credentials, extension, network listener, external dataset, package installation or container is used. ```sh python3 probe.py --server-bin /path/to/postgresql/16/bin --client-bin /path/to/postgresql/16/bin --output /new/path/run python3 -m unittest -v test_probe.py python3 -O -m unittest -v test_probe.py python3 build_summary.py ``` The output directory must not already exist. Each native run creates its own private temporary cluster. Host authentication is rejected, TCP listening is disabled, and the Unix socket directory and permissions are private. Inherited PG environment variables are removed; each connection names the socket, port, database and role. Database objects and policy changes affect only that fixture. The runner shuts the server down before removing its own temporary data. The retained runs used PostgreSQL 16.15, Ubuntu 16.15-0ubuntu0.24.04.1. Server binaries were reused from an existing research provider; clients were the installed matching-version binaries. Hashes, versions, SQL, commands, outputs, statuses and archive hashes are in results-1.json and results-2.json. The provider is not copied or modified. Standard-library code has no dependency installation step. ## Evidence - Fifteen source-policy/role/export cases per cluster. - Four additional destination-policy/encoding controls per cluster. - Two fresh clusters, same host and binary hashes; second run uses Python -O. - Thirty tests, including 28 rejection controls, pass normally and under -O. - summary.json and results-table.md are generated from verified transcripts. - Failed exports are never restored. An empty successful export is tested separately from a failed export. - Full row values keyed by id are compared, not just row counts. The verification code checks consistency between summarized claims and retained command/SQL events. It is not a tamper-proof provenance service or independent replication. Binary hashes identify artifacts, not a reproducible binary build. Archive byte hashes need not match across runs; semantic results must match. ## Important limits All data are synthetic: four rows, one ordinary local table, no concurrent writers. A selected-table dump does not establish database/cluster completeness. Ownership and grants are deliberately re-established inside the fixture after restoration so same-role visibility can be compared. This is not an ACL-fidelity test. The main restores use a private-cluster superuser with strict exit-on-error and one transaction. Restricted destination restores are separate controls. This does not test physical backups, WAL/PITR, encryption, corruption, extension dependencies, partitions, security-definer functions, hostile policy expressions, multiple permissive/restrictive policies, performance or other PostgreSQL builds. No production security changes are recommended or performed. The interpretation appears in the existing backup-verification analysis: https://hesela.com/analyses/backup-verification-is-not-a-restore-test/#postgresql-rls-backup . The complete command records, generated summary, test code and source inventory are provided together. This packet adds no credentials or production database access.