postgresql16-anonymizer/README.md
Petr Khartskhaev ecc96d19a7 Update to 2.5.1
Resolves: 2415505
2026-01-05 14:06:10 +01:00

1.4 KiB

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:

  1. 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
    
  2. Install and initialize pgrx:

    $ cargo install cargo-pgrx --version 0.14.3 --locked
    
    $ cargo pgrx init --pg16 /usr/bin/pg_config
    
  3. 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
    
  4. Run the tests

    $ make installcheck PG_CONFIG=/usr/bin/pg_config PGVER=pg16