diff options
-rw-r--r-- | contrib/basebackup_to_shell/basebackup_to_shell.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/basebackup_to_shell/basebackup_to_shell.c b/contrib/basebackup_to_shell/basebackup_to_shell.c index 29f5069d427..57ed587d488 100644 --- a/contrib/basebackup_to_shell/basebackup_to_shell.c +++ b/contrib/basebackup_to_shell/basebackup_to_shell.c @@ -263,6 +263,11 @@ shell_run_command(bbsink_shell *sink, const char *filename) /* Run it. */ sink->pipe = OpenPipeStream(sink->current_command, PG_BINARY_W); + if (sink->pipe == NULL) + ereport(ERROR, + (errcode_for_file_access(), + errmsg("could not execute command \"%s\": %m", + sink->current_command))); } /* |