mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Add --no-toast-compression to pg_dumpall
This is an oversight from bbe0a81d
, where the equivalent option exists
in pg_dump. This is useful to be able to reset the compression methods
cluster-wide when restoring the data based on default_toast_compression.
Reviewed-by: Daniel Gustafsson, Tom Lane
Discussion: https://postgr.es/m/YKHC+qCJvzCRVCpY@paquier.xyz
This commit is contained in:
@ -77,6 +77,7 @@ static int no_comments = 0;
|
||||
static int no_publications = 0;
|
||||
static int no_security_labels = 0;
|
||||
static int no_subscriptions = 0;
|
||||
static int no_toast_compression = 0;
|
||||
static int no_unlogged_table_data = 0;
|
||||
static int no_role_passwords = 0;
|
||||
static int server_version;
|
||||
@ -144,6 +145,7 @@ main(int argc, char *argv[])
|
||||
{"no-security-labels", no_argument, &no_security_labels, 1},
|
||||
{"no-subscriptions", no_argument, &no_subscriptions, 1},
|
||||
{"no-sync", no_argument, NULL, 4},
|
||||
{"no-toast-compression", no_argument, &no_toast_compression, 1},
|
||||
{"no-unlogged-table-data", no_argument, &no_unlogged_table_data, 1},
|
||||
{"on-conflict-do-nothing", no_argument, &on_conflict_do_nothing, 1},
|
||||
{"rows-per-insert", required_argument, NULL, 7},
|
||||
@ -428,6 +430,8 @@ main(int argc, char *argv[])
|
||||
appendPQExpBufferStr(pgdumpopts, " --no-security-labels");
|
||||
if (no_subscriptions)
|
||||
appendPQExpBufferStr(pgdumpopts, " --no-subscriptions");
|
||||
if (no_toast_compression)
|
||||
appendPQExpBufferStr(pgdumpopts, " --no-toast-compression");
|
||||
if (no_unlogged_table_data)
|
||||
appendPQExpBufferStr(pgdumpopts, " --no-unlogged-table-data");
|
||||
if (on_conflict_do_nothing)
|
||||
@ -651,6 +655,7 @@ help(void)
|
||||
printf(_(" --no-subscriptions do not dump subscriptions\n"));
|
||||
printf(_(" --no-sync do not wait for changes to be written safely to disk\n"));
|
||||
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
|
||||
printf(_(" --no-toast-compression do not dump TOAST compression methods\n"));
|
||||
printf(_(" --no-unlogged-table-data do not dump unlogged table data\n"));
|
||||
printf(_(" --on-conflict-do-nothing add ON CONFLICT DO NOTHING to INSERT commands\n"));
|
||||
printf(_(" --quote-all-identifiers quote all identifiers, even if not key words\n"));
|
||||
|
Reference in New Issue
Block a user