projects
/
postgresql-pgindent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
| inline |
side by side
(parent:
4b1ad19
)
basebackup_to_shell: Check for a NULL return from OpenPipeStream.
author
Robert Haas
<
[email protected]
>
Wed, 12 Apr 2023 15:37:13 +0000
(11:37 -0400)
committer
Robert Haas
<
[email protected]
>
Wed, 12 Apr 2023 15:37:13 +0000
(11:37 -0400)
Per complaint from Peter Eisentraut.
Discussion: http://postgr.es/m/
4f1707cc
-2432-da35-64a2-
5c2a8d92a388
@enterprisedb.com
contrib/basebackup_to_shell/basebackup_to_shell.c
|
blob
|
blame
|
history
diff --git
a/contrib/basebackup_to_shell/basebackup_to_shell.c
b/contrib/basebackup_to_shell/basebackup_to_shell.c
index 29f5069d427baaa0f4063809ddc560b835612b0a..57ed587d4888e1a41403164686a4df5201180381 100644
(file)
--- 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)));
}
/*