4
4
from pg_anon .common import (
5
5
exception_handler ,
6
6
AnonMode ,
7
- OutputFormat ,
8
7
VerboseOptions ,
9
8
ScanMode ,
10
9
)
@@ -86,20 +85,6 @@ def get_arg_parser():
86
85
parser .add_argument (
87
86
"--mode" , type = AnonMode , choices = list (AnonMode ), default = AnonMode .INIT
88
87
)
89
- parser .add_argument (
90
- "--copy-options" ,
91
- dest = "copy_options" ,
92
- default = "" ,
93
- help = 'Options for COPY command like "with binary".' ,
94
- )
95
- parser .add_argument (
96
- "--format" ,
97
- dest = "format" ,
98
- type = OutputFormat ,
99
- choices = list (OutputFormat ),
100
- default = OutputFormat .BINARY .value ,
101
- help = "COPY data format, can be overwritten by --copy-options. Selects the data format to be read or written: text, csv or binary." ,
102
- )
103
88
parser .add_argument (
104
89
"--verbose" ,
105
90
dest = "verbose" ,
@@ -109,9 +94,30 @@ def get_arg_parser():
109
94
help = "Enable verbose output" ,
110
95
)
111
96
parser .add_argument ("--dict-file" , type = str , default = "" )
112
- parser .add_argument ("--threads" , type = int , default = 4 )
113
- parser .add_argument ("--pg-dump" , type = str , default = "/usr/bin/pg_dump" )
114
- parser .add_argument ("--pg-restore" , type = str , default = "/usr/bin/pg_restore" )
97
+ parser .add_argument (
98
+ "--threads" ,
99
+ type = int ,
100
+ default = 4 ,
101
+ help = "Amount of threads for IO operations." ,
102
+ )
103
+ parser .add_argument (
104
+ "--processes" ,
105
+ type = int ,
106
+ default = 4 ,
107
+ help = "Amount of processes for multiprocessing operations." ,
108
+ )
109
+ parser .add_argument (
110
+ "--pg-dump" ,
111
+ type = str ,
112
+ default = "/usr/bin/pg_dump" ,
113
+ help = "Path to the `pg_dump` Postgres tool" ,
114
+ )
115
+ parser .add_argument (
116
+ "--pg-restore" ,
117
+ type = str ,
118
+ default = "/usr/bin/pg_restore" ,
119
+ help = "Path to the `pg_dump` Postgres tool." ,
120
+ )
115
121
parser .add_argument ("--output-dir" , type = str , default = "" )
116
122
parser .add_argument ("--input-dir" , type = str , default = "" )
117
123
parser .add_argument (
@@ -128,26 +134,24 @@ def get_arg_parser():
128
134
)
129
135
parser .add_argument ("--clear-output-dir" , action = "store_true" , default = False )
130
136
parser .add_argument (
131
- "--drop-custom-check-constr" , action = "store_true" , default = False
132
- )
133
- parser .add_argument (
134
- "--seq-init-by-max-value" ,
137
+ "--drop-custom-check-constr" ,
135
138
action = "store_true" ,
136
139
default = False ,
137
- help = """Initialize sequences based on maximum values. Otherwise, the sequences will be initialized
138
- based on the values of the source database."" " ,
140
+ help = "Drop all CHECK constrains containing user-defined procedures to avoid performance "
141
+ "degradation at the data loading stage. " ,
139
142
)
140
143
parser .add_argument (
141
- "--disable-checks " ,
144
+ "--seq-init-by-max-value " ,
142
145
action = "store_true" ,
143
146
default = False ,
144
- help = """Disable checks of disk space and PostgreSQL version""" ,
147
+ help = "Initialize sequences based on maximum values. Otherwise, the sequences "
148
+ "will be initialized based on the values of the source database." ,
145
149
)
146
150
parser .add_argument (
147
- "--skip-data " ,
151
+ "--disable-checks " ,
148
152
action = "store_true" ,
149
153
default = False ,
150
- help = """Don't copy data. Only the database structure will be dumped"" " ,
154
+ help = "Disable checks of disk space and PostgreSQL version. " ,
151
155
)
152
156
parser .add_argument (
153
157
"--scan-mode" ,
0 commit comments