Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9012e55

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. We normally use 'parallel workers' at other places so change it for parallel vacuum accordingly. Author: Bharath Rupireddy Reviewed-by: Dilip Kumar, Amit Kapila Backpatch-through: 13 Discussion: https://postgr.es/m/CALj2ACWz=PYrrFXVsEKb9J1aiX4raA+UBe02hdRp_zqDkrWUiw@mail.gmail.com
1 parent a23c0b0 commit 9012e55

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 parallel degree of <firstterm>parallel vacuum</firstterm>.
237+
Specify the number of parallel workers 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("parallel vacuum degree must be between 0 and %d",
163+
errmsg("parallel workers 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("parallel vacuum degree must be a non-negative integer");
192+
pg_log_error("parallel workers for vacuum must be greater 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: parallel vacuum degree must be between 0 and 1024
113+
ERROR: parallel workers 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)