rheinwerk-verlag / pganonymize

A commandline tool for anonymizing PostgreSQL databases
http://pganonymize.readthedocs.io/
Other
41 stars 26 forks source link

Support --format=plain option for pg_dump #60

Closed fblackburn1 closed 3 months ago

fblackburn1 commented 4 months ago

I would like to have an option to choose how pg_dump will format the database (i.e. plain vs custom) I could make a PR to support it, but I need to know Would you interested to have this kind of option? What do you think of --dump-format (plain, custom directory, tar) and --dump-compress (0..9) ? Or do you prefer something more generic to pass any pg_dump options to the command?

hkage commented 3 months ago

Great idea! You are welcomed to add this option to the dump-feature.

In my opinion and if it isn't too time consuming, we could pass additional (and optional) pg_dump arguments, e.g. by using --dump-file (which activates the dump creation) and --dump-options="--compress=9 --format=t" (or dump-arguments) for all optional arguments. This would make the dump creation more flexible and we don't have to re-implement every argument/option if other users would like to see them.

fblackburn1 commented 3 months ago

~~For records, I created a PR to add --dump-options Since this branch has a lot of conflict with the --parallel option branch, I decided to use this parallel branch as base branch (and cannot open PR in this repo until the first one got merged)~~

edit: Will be fixed by https://github.com/rheinwerk-verlag/pganonymize/pull/63