Add a --force option to upgrade an existing PostgreSQL instalation.

This could be useful, for readding recently failed nodes.
This commit is contained in:
Jaime Casanova
2010-10-08 02:55:52 -05:00
parent d42f3e25f4
commit 7dce793882
3 changed files with 51 additions and 11 deletions

View File

@@ -202,3 +202,15 @@ mkdir_p(char *path, mode_t omode)
(void) umask(oumask);
return retval;
}
bool
is_pg_dir(char *dir)
{
char path[8192];
struct stat sb;
sprintf(path, "%s/PG_VERSION", dir);
return (stat(path, &sb) == 0) ? true : false;
}