GreenmaskIO / greenmask

PostgreSQL database anonymization and synthetic data generation tool
https://greenmask.io
Apache License 2.0
1.14k stars 21 forks source link

Disabling foreign keys on AWS RDS. #228

Open N-Putting opened 3 weeks ago

N-Putting commented 3 weeks ago

As RDS does not support --disable-triggers is there any way to use set session_replication_role = replica; to disable it for each session? I tried it with a before and after data script but it won't work for jobs as it would need to run for each.

Here is an example how pgsync did it with another option. https://github.com/ankane/pgsync/commit/88d17cd8ca3c5cad78062b6520df228aaaa119ef

wwoytenko commented 3 weeks ago

Hi! This will require a small code change, and I should be able to publish it this week. It looks like --disable-triggers might not be functioning correctly at the moment either. I’ll keep you posted.