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

Commit9012e55

Browse files
author
Amit Kapila
committed
Improve docs and error messages for parallel vacuum.
The error messages, docs, and one of the options were using'parallel degree' to indicate parallelism used by vacuum command. Wenormally use 'parallel workers' at other places so change it for parallelvacuum accordingly.Author: Bharath RupireddyReviewed-by: Dilip Kumar, Amit KapilaBackpatch-through: 13Discussion:https://postgr.es/m/CALj2ACWz=PYrrFXVsEKb9J1aiX4raA+UBe02hdRp_zqDkrWUiw@mail.gmail.com
1 parenta23c0b0 commit9012e55

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ PostgreSQL documentation
230230
</varlistentry>
231231

232232
<varlistentry>
233-
<term><option>-P <replaceable class="parameter">parallel_degree</replaceable></option></term>
234-
<term><option>--parallel=<replaceable class="parameter">parallel_degree</replaceable></option></term>
233+
<term><option>-P <replaceable class="parameter">parallel_workers</replaceable></option></term>
234+
<term><option>--parallel=<replaceable class="parameter">parallel_workers</replaceable></option></term>
235235
<listitem>
236236
<para>
237-
Specify the paralleldegree of <firstterm>parallel vacuum</firstterm>.
237+
Specify thenumber ofparallelworkers for <firstterm>parallel vacuum</firstterm>.
238238
This allows the vacuum to leverage multiple CPUs to process indexes.
239239
See <xref linkend="sql-vacuum"/>.
240240
</para>

‎src/backend/commands/vacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ ExecVacuum(ParseState *pstate, VacuumStmt *vacstmt, bool isTopLevel)
160160
if (nworkers<0||nworkers>MAX_PARALLEL_WORKER_LIMIT)
161161
ereport(ERROR,
162162
(errcode(ERRCODE_SYNTAX_ERROR),
163-
errmsg("parallelvacuum degree must be between 0 and %d",
163+
errmsg("parallelworkers for vacuum must be between 0 and %d",
164164
MAX_PARALLEL_WORKER_LIMIT),
165165
parser_errposition(pstate,opt->location)));
166166

‎src/bin/scripts/vacuumdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
189189
vacopts.parallel_workers=atoi(optarg);
190190
if (vacopts.parallel_workers<0)
191191
{
192-
pg_log_error("parallelvacuum degreemust bea non-negative integer");
192+
pg_log_error("parallelworkers for vacuummust begreater than or equal to zero");
193193
exit(1);
194194
}
195195
break;
@@ -920,7 +920,7 @@ help(const char *progname)
920920
printf(_(" -j, --jobs=NUM use this many concurrent connections to vacuum\n"));
921921
printf(_(" --min-mxid-age=MXID_AGE minimum multixact ID age of tables to vacuum\n"));
922922
printf(_(" --min-xid-age=XID_AGE minimum transaction ID age of tables to vacuum\n"));
923-
printf(_(" -P, --parallel=PARALLEL_DEGREE use this many background workers for vacuum, if available\n"));
923+
printf(_(" -P, --parallel=PARALLEL_WORKERS use this many background workers for vacuum, if available\n"));
924924
printf(_(" -q, --quiet don't write any messages\n"));
925925
printf(_(" --skip-locked skip relations that cannot be immediately locked\n"));
926926
printf(_(" -t, --table='TABLE[(COLUMNS)]' vacuum specific table(s) only\n"));

‎src/test/regress/expected/vacuum.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ VACUUM (PARALLEL 2) pvactst;
110110
UPDATE pvactst SET i = i WHERE i < 1000;
111111
VACUUM (PARALLEL 0) pvactst; -- disable parallel vacuum
112112
VACUUM (PARALLEL -1) pvactst; -- error
113-
ERROR: parallelvacuum degree must be between 0 and 1024
113+
ERROR: parallelworkers for vacuum must be between 0 and 1024
114114
LINE 1: VACUUM (PARALLEL -1) pvactst;
115115
^
116116
VACUUM (PARALLEL 2, INDEX_CLEANUP FALSE) pvactst;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp