@@ -396,6 +396,12 @@ tablespace_list_append(const char *arg)
396
396
static void
397
397
usage (void )
398
398
{
399
+ #ifdef PERCONA_EXT
400
+ #define WAL_METHODS "none|stream"
401
+ #else
402
+ #define WAL_METHODS "none|fetch|stream"
403
+ #endif
404
+
399
405
printf (_ ("%s takes a base backup of a running PostgreSQL server.\n\n" ),
400
406
progname );
401
407
printf (_ ("Usage:\n" ));
@@ -414,7 +420,7 @@ usage(void)
414
420
printf (_ (" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
415
421
" relocate tablespace in OLDDIR to NEWDIR\n" ));
416
422
printf (_ (" --waldir=WALDIR location for the write-ahead log directory\n" ));
417
- printf (_ (" -X, --wal-method=none|fetch|stream \n"
423
+ printf (_ (" -X, --wal-method=" WAL_METHODS " \n"
418
424
" include required WAL files with specified method\n" ));
419
425
printf (_ (" -z, --gzip compress tar output\n" ));
420
426
printf (_ (" -Z, --compress=[{client|server}-]METHOD[:DETAIL]\n"
@@ -2548,6 +2554,9 @@ main(int argc, char **argv)
2548
2554
else if (strcmp (optarg , "f" ) == 0 ||
2549
2555
strcmp (optarg , "fetch" ) == 0 )
2550
2556
{
2557
+ #ifdef PERCONA_EXT
2558
+ pg_fatal ("\"fetch\" wal-method is not supported with Percona features, must be \"stream\" or \"none\"" );
2559
+ #endif
2551
2560
includewal = FETCH_WAL ;
2552
2561
}
2553
2562
else if (strcmp (optarg , "s" ) == 0 ||
0 commit comments