*** a/src/bin/pg_basebackup/pg_basebackup.c
--- b/src/bin/pg_basebackup/pg_basebackup.c
***************
*** 2268,2273 **** main(int argc, char **argv)
--- 2268,2283 ----
  		exit(1);
  	}
  
+ 	if (format == 't' && streamwal && strcmp(basedir, "-") == 0)
+ 	{
+ 		fprintf(stderr,
+ 			_("%s: cannot stream transaction logs in tar mode to stdout\n"),
+ 				progname);
+ 		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ 				progname);
+ 		exit(1);
+ 	}
+ 
  	if (replication_slot && !streamwal)
  	{
  		fprintf(stderr,
