File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -316,16 +316,22 @@ PostgreSQL documentation
316316 </varlistentry>
317317
318318 <varlistentry>
319- <term><option>--wal-segsize=<replaceable>SEGSIZE </replaceable></option></term>
319+ <term><option>--wal-segsize=<replaceable>size </replaceable></option></term>
320320 <listitem>
321321 <para>
322- Set the <firstterm>WAL segment size</firstterm>, in megabytes. This is
323- the size of each individual file in the WAL log. It may be useful
324- to adjust this size to control the granularity of WAL log shipping.
325- This option can only be set during initialization, and cannot be
326- changed later.
327- The default size is 16 megabytes.
328- The value must be a power of 2 between 1 and 1024 (megabytes).
322+ Set the <firstterm>WAL segment size</firstterm>, in megabytes. This
323+ is the size of each individual file in the WAL log. The default size
324+ is 16 megabytes. The value must be a power of 2 between 1 and 1024
325+ (megabytes). This option can only be set during initialization, and
326+ cannot be changed later.
327+ </para>
328+
329+ <para>
330+ It may be useful to adjust this size to control the granularity of
331+ WAL log shipping or archiving. Also, in databases with a high volume
332+ of WAL, the sheer number of WAL files per directory can become a
333+ performance and management problem. Increasing the WAL file size
334+ will reduce the number of WAL files.
329335 </para>
330336 </listitem>
331337 </varlistentry>
Original file line number Diff line number Diff line change @@ -3224,7 +3224,7 @@ main(int argc, char *argv[])
32243224 wal_segment_size_mb = strtol (str_wal_segment_size_mb , & endptr , 10 );
32253225
32263226 /* verify that wal segment size is valid */
3227- if (* endptr != '\0' )
3227+ if (endptr == str_wal_segment_size_mb || * endptr != '\0' )
32283228 {
32293229 fprintf (stderr ,
32303230 _ ("%s: argument of --wal-segsize must be a number\n" ),
@@ -3234,7 +3234,7 @@ main(int argc, char *argv[])
32343234 if (!IsValidWalSegSize (wal_segment_size_mb * 1024 * 1024 ))
32353235 {
32363236 fprintf (stderr ,
3237- _ ("%s: argument of --wal-segsize must be a power of two between 1 and 1024\n" ),
3237+ _ ("%s: argument of --wal-segsize must be a power of 2 between 1 and 1024\n" ),
32383238 progname );
32393239 exit (1 );
32403240 }
You can’t perform that action at this time.
0 commit comments