Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7c4c842

Browse files
author
Artur Zakirov
committed
PGDATA parameter is required for init
1 parent ba54e49 commit 7c4c842

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

init.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ do_init(void)
3838

3939
struct dirent **dp;
4040
int results;
41+
42+
/* PGDATA is always required */
43+
if (pgdata == NULL)
44+
elog(ERROR, "Required parameter not specified: PGDATA "
45+
"(-D, --pgdata)");
46+
4147
if (access(backup_path, F_OK) == 0)
4248
{
4349
results = scandir(backup_path, &dp, selects, NULL);

0 commit comments

Comments
 (0)