# Brume: FK-safe pseudonymization for PostgreSQL test and debug copies

DevFeed: [Brume: FK-safe pseudonymization for PostgreSQL test and debug copies](<https://devfeed.tech/articles/brume-fk-safe-pseudonymization-for-postgresql-test-and-debug-copies-122264.md>)

Original publisher: [Read original article](<https://www.postgresql.org/about/news/brume-fk-safe-pseudonymization-for-postgresql-test-and-debug-copies-3434/>)

Published: 2026-11-07T00:00:00Z

Content type: release

Language: en

Sources: [PostgreSQL news](<https://devfeed.tech/sources/postgresql-news.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>), [database-consistency](<https://devfeed.tech/topics/database-consistency.md>)

Tags: [apache-2-0](<https://devfeed.tech/tags/apache-2-0.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [development](<https://devfeed.tech/tags/development.md>), [email](<https://devfeed.tech/tags/email.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fake](<https://devfeed.tech/tags/fake.md>), [foreign-keys](<https://devfeed.tech/tags/foreign-keys.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [personal-data](<https://devfeed.tech/tags/personal-data.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [referential-integrity](<https://devfeed.tech/tags/referential-integrity.md>), [synthetic](<https://devfeed.tech/tags/synthetic.md>), [table](<https://devfeed.tech/tags/table.md>), [target](<https://devfeed.tech/tags/target.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tool](<https://devfeed.tech/tags/tool.md>)

## AI overview

Brume 2.1 creates deterministic, pseudonymized PostgreSQL extracts for testing, debugging, or demos while preserving foreign-key integrity. It reads from the source and transforms data before writing a selected subset to a target database or SQL file. Column strategies include synthetic values, partial masking, hashing, nullification, format-preserving encryption for identifiers, and date shifting. Stable outputs use user-provided secrets; linked_columns keeps shared values consistent even without formal foreign keys. Row filters and configurable traversal of parent and child foreign keys produce smaller coherent extracts. A reviewable brume.yml configures table and column strategies, semantic types, and JSONB paths. The text says Brume supports PostgreSQL 12-18 and describes pseudonymization as one GDPR measure; it does not claim pseudonymization alone ensures compliance.

## Source excerpt

Brume 2.1, an open source (Apache 2.0) tool that creates deterministic, foreign-key-safe pseudonymized copies of PostgreSQL databases for testing, debugging and demos, is now available. Why Brume? Development teams often need realistic data to reproduce bugs, run tests or prepare demos, but copying production exposes real personal data. Classic masking scripts also tend to break referential integrity, which forces you to disable triggers, suspend constraints or repair broken joins by hand. Brume copies a targeted subset of a source database to a target database or to a .sql file, and transforms personal data on the fly, before anything is written. Foreign keys stay valid end-to-end on the target. Brume only reads from the source database. Key features Column-level strategies: FAKE for realistic synthetic values, MASK for partial reveals, HASH for one-way hashing, NULLIFY to drop sensitive data, FPE_ID / FPE_UUID for format-preserving encryption of identifiers, and DATE_SHIFT to move dates while keeping their distribution. Deterministic output: transformations are keyed by your own secrets. The same input with the same secret always gives the same output, across all releases of a major version, so test fixtures and debug sessions stay stable from one run to the next. Referential integrity: format-preserving encryption rewrites primary keys and the foreign keys pointing to them consistently. With linked_columns, a value shared between tables that have no formal foreign key (for example, an email in both users and audit_logs) gets the same pseudonym everywhere. Subsetting: define row-level filters on any table (created_at >= '2025-01-01', tenant_id = 42...). Brume follows foreign keys up to a configurable depth, towards parents and children, to produce a small, self-contained and coherent extract. Declarative configuration: a single brume.yml file describes the strategy for each table and column, with semantic types (EMAIL, PHONE, IBAN, ADDRESS...) and JSONB paths to t