[go: up one dir, main page]

pg_dump_anon and constraints bug

Hello,

While doing my tests of the extension, I noticed a bug concerning the constraints when generating the dump with pg_dump_anon.

In the generated dump file, table constraints are added before the data copy. But if you have foreign key constraints between tables, it is a problem and it causes errors.

In my sample, I have two schemas : my_schema and public, with a foreign key constraint on my_schema.my_table.fk_column to public.table.pk. When I restore the anonymized database with the generated anonymized dump file, I have constraint errors.

Is it a bug ?

Do you have a workaround for this problem ?

Thanks

Edited by Nicolas Peltier