ALTER DATABASE dbase SET session_preload_libraries='anon';
In documentation https://postgresql-anonymizer.readthedocs.io/en/latest/declare_masking_rules/
There is an alternative way for declaring masking rules, using the COMMENT syntax :
COMMENT ON COLUMN player.name IS 'MASKED WITH FUNCTION anon.fake_last_name()' This is useful especially if you can't modify the instance confiraguration and load the extension with shared_preload_libraries. In this situation, the security labels won't work and you have to declare rules with comments.
We don't have access to the postgresql.conf too. To solve this problem we used:
ALTER DATABASE dbase SET session_preload_libraries='anon';
The question is: is it good to use it instead of to add to shared_preload_libraries in postgresql.conf? Is here some negative drawback? (Of cause it slightly slow a connectioning, anything else?)
And if this is good, may be worth to mention this solution in documentation and remove support for masking rules in comments.