Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit694da19

Browse files
committed
Add --no-toast-compression to pg_dumpall
This is an oversight frombbe0a81, where the equivalent option existsin pg_dump. This is useful to be able to reset the compression methodscluster-wide when restoring the data based on default_toast_compression.Reviewed-by: Daniel Gustafsson, Tom LaneDiscussion:https://postgr.es/m/YKHC+qCJvzCRVCpY@paquier.xyz
1 parent2e7c178 commit694da19

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,18 @@ PostgreSQL documentation
458458
</listitem>
459459
</varlistentry>
460460

461+
<varlistentry>
462+
<term><option>--no-toast-compression</option></term>
463+
<listitem>
464+
<para>
465+
Do not output commands to set <acronym>TOAST</acronym> compression
466+
methods.
467+
With this option, all objects will be created using whichever
468+
compression method is the default during restore.
469+
</para>
470+
</listitem>
471+
</varlistentry>
472+
461473
<varlistentry>
462474
<term><option>--no-unlogged-table-data</option></term>
463475
<listitem>

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static intno_comments = 0;
7777
staticintno_publications=0;
7878
staticintno_security_labels=0;
7979
staticintno_subscriptions=0;
80+
staticintno_toast_compression=0;
8081
staticintno_unlogged_table_data=0;
8182
staticintno_role_passwords=0;
8283
staticintserver_version;
@@ -144,6 +145,7 @@ main(int argc, char *argv[])
144145
{"no-security-labels",no_argument,&no_security_labels,1},
145146
{"no-subscriptions",no_argument,&no_subscriptions,1},
146147
{"no-sync",no_argument,NULL,4},
148+
{"no-toast-compression",no_argument,&no_toast_compression,1},
147149
{"no-unlogged-table-data",no_argument,&no_unlogged_table_data,1},
148150
{"on-conflict-do-nothing",no_argument,&on_conflict_do_nothing,1},
149151
{"rows-per-insert",required_argument,NULL,7},
@@ -428,6 +430,8 @@ main(int argc, char *argv[])
428430
appendPQExpBufferStr(pgdumpopts," --no-security-labels");
429431
if (no_subscriptions)
430432
appendPQExpBufferStr(pgdumpopts," --no-subscriptions");
433+
if (no_toast_compression)
434+
appendPQExpBufferStr(pgdumpopts," --no-toast-compression");
431435
if (no_unlogged_table_data)
432436
appendPQExpBufferStr(pgdumpopts," --no-unlogged-table-data");
433437
if (on_conflict_do_nothing)
@@ -651,6 +655,7 @@ help(void)
651655
printf(_(" --no-subscriptions do not dump subscriptions\n"));
652656
printf(_(" --no-sync do not wait for changes to be written safely to disk\n"));
653657
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
658+
printf(_(" --no-toast-compression do not dump TOAST compression methods\n"));
654659
printf(_(" --no-unlogged-table-data do not dump unlogged table data\n"));
655660
printf(_(" --on-conflict-do-nothing add ON CONFLICT DO NOTHING to INSERT commands\n"));
656661
printf(_(" --quote-all-identifiers quote all identifiers, even if not key words\n"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp