You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -24,6 +24,35 @@ pg-osc is inspired by the design and workings of tools like pg_repack and pt-onl
24
24
25
25
Proceed with caution when using this on production like workloads. Best to try on similar setup or staging like environment first. Read on below for some examples and caveats.
-a, --alter-statement=ALTER_STATEMENT # The ALTER statement to perform the schema change
35
+
-s, --schema=SCHEMA # The schema in which the table is
36
+
# Default: public
37
+
-d, --dbname=DBNAME # Name of the database
38
+
-h, --host=HOST # Server host where the Database is located
39
+
-u, --username=USERNAME # Username for the Database
40
+
-p, --port=N # Port for the Database
41
+
# Default: 5432
42
+
-w, [--password=PASSWORD] # DEPRECATED: Password for the Database. Please pass PGPASSWORD environment variable instead.
43
+
-v, [--verbose], [--no-verbose] # Emit logs in debug mode
44
+
-f, [--drop], [--no-drop] # Drop the original table in the end after the swap
45
+
-k, [--kill-backends], [--no-kill-backends] # Kill other competing queries/backends when trying to acquire lock for the shadow table creation and swap. It will wait for --wait-time-for-lock duration before killing backends and try upto 3 times.
46
+
-w, [--wait-time-for-lock=N] # Time to wait before killing backends to acquire lock and/or retrying upto 3 times. It will kill backends if --kill-backends is true, otherwise try upto 3 times and exit if it cannot acquire a lock.
47
+
# Default: 10
48
+
-c, [--copy-statement=COPY_STATEMENT] # Takes a .sql file location where you can provide a custom query to be played (ex: backfills) when pgosc copies data from the primary to the shadow table. More examples in README.
49
+
-b, [--pull-batch-count=N] # Number of rows to be replayed on each iteration after copy. This can be tuned for faster catch up and swap. Best used with delta-count.
50
+
# Default: 1000
51
+
-e, [--delta-count=N] # Indicates how many rows should be remaining before a swap should be performed. This can be tuned for faster catch up and swap, especially on highly volume tables. Best used with pull-batch-count.
52
+
# Default: 20
53
+
-o, [--skip-foreign-key-validation], [--no-skip-foreign-key-validation] # Skip foreign key validation after swap. You shouldn't need this unless you have a very specific use case, like manually validating foreign key constraints after swap.
0 commit comments