Mask or replace personally identifiable information (PII) or sensitive data
|
|
||
|---|---|---|
| .fmf | ||
| plans | ||
| tests/installcheck | ||
| .gitignore | ||
| anonymizer-cargo.patch | ||
| create-vendored-tarball.sh | ||
| postgresql16-anonymizer.spec | ||
| README.md | ||
| remove-disallowed-licenses.patch | ||
| sources | ||
postgresql16-anonymizer
The postgresql16-anonymizer package
Testing
There are many integration tests provided by upstream that cannot be run during the build due to postgres's restrictions. To run those tests manually, follow these steps:
-
Install additional dependencies for building rust and built-in postgres extensions:
$ dnf --setopt=install_weak_deps=False install rustfmt wget diffutils postgresql16-server-devel postgresql16-contrib postgresql16-anonymizer -
Install and initialize pgrx:
$ cargo install cargo-pgrx --version 0.14.3 --locked$ cargo pgrx init --pg16 /usr/bin/pg_config -
Download and extract the source tarball and patch test files (replace
{version}with the current version of the software):$ wget https://gitlab.com/dalibo/postgresql_anonymizer/-/archive/{version}/postgresql_anonymizer-{version}.tar.bz2$ tar -xvf postgresql_anonymizer-{version}.tar.bz2$ cd postgresql_anonymizer-{version}$ sed -i "s/^CONNECTION 'host=localhost/CONNECTION 'host=localhost port=28816/" tests/sql/test_replica_masking.sql$ sed -i "s/^CONNECTION 'host=localhost/CONNECTION 'host=localhost port=28816/" tests/expected/test_replica_masking.out -
Run the tests
$ make installcheck PG_CONFIG=/usr/bin/pg_config PGVER=pg16