File tree 2 files changed +16
-10
lines changed
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -316,16 +316,22 @@ PostgreSQL documentation
316
316
</varlistentry>
317
317
318
318
<varlistentry>
319
- <term><option>--wal-segsize=<replaceable>SEGSIZE </replaceable></option></term>
319
+ <term><option>--wal-segsize=<replaceable>size </replaceable></option></term>
320
320
<listitem>
321
321
<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.
329
335
</para>
330
336
</listitem>
331
337
</varlistentry>
Original file line number Diff line number Diff line change @@ -3224,7 +3224,7 @@ main(int argc, char *argv[])
3224
3224
wal_segment_size_mb = strtol (str_wal_segment_size_mb , & endptr , 10 );
3225
3225
3226
3226
/* verify that wal segment size is valid */
3227
- if (* endptr != '\0' )
3227
+ if (endptr == str_wal_segment_size_mb || * endptr != '\0' )
3228
3228
{
3229
3229
fprintf (stderr ,
3230
3230
_ ("%s: argument of --wal-segsize must be a number\n" ),
@@ -3234,7 +3234,7 @@ main(int argc, char *argv[])
3234
3234
if (!IsValidWalSegSize (wal_segment_size_mb * 1024 * 1024 ))
3235
3235
{
3236
3236
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" ),
3238
3238
progname );
3239
3239
exit (1 );
3240
3240
}
You can’t perform that action at this time.
0 commit comments