diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | README | 10 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | postgresql-setup.in | 10 |
4 files changed, 26 insertions, 2 deletions
@@ -4,9 +4,14 @@ Bugfixes in 3.4 version * Fix upgrade for non-standard unit names with --unit option. +New in 3.4 version + * Add --upgrade-from-unit option which allows proper selection of predecessor service name (when the default detection does not help). +* postgresql-setup now throws warning if the PGDATA directory (or its + parent directory) is a mountpoint. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bugfixes in 3.3 version @@ -3,7 +3,13 @@ postgresql-setup ---------------- BuildRequires: - - m4, docbook-utils, help2man, elinks (pretty README.rpm-dist) + - m4 + - docbook-utils + - help2man + - elinks (pretty README.rpm-dist) -Maintainer's BuildRequires +Suggested BuildRequires: + - util-linux (mountpoint utility) + +Maintainer's BuildRequires: - autoconf, automake, autoconf-archive diff --git a/configure.ac b/configure.ac index 133065a..5d8a4a4 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ sed_subst_var_pattern(docdir) sed_subst_var_pattern(includedir) sed_subst_var_pattern(libdir) sed_subst_var_pattern(libexecdir) +sed_subst_var_pattern(MOUNTPOINT) sed_subst_var_pattern(top_srcdir) sed_subst_var_pattern(PGDATADIR) sed_subst_var_pattern(PGMAJORVERSION) @@ -111,6 +112,8 @@ test -z "$ac_cv_path_SU" && SU_POSTGRES="$SU -s /bin/sh -l postgres" AC_SUBST([SU_POSTGRES]) +AC_PATH_PROG([MOUNTPOINT], [mountpoint], [false]) + PGSETUP_PACKAGING_INIT # check for main PostgreSQL binaries diff --git a/postgresql-setup.in b/postgresql-setup.in index 7d5a0eb..20d5ad6 100644 --- a/postgresql-setup.in +++ b/postgresql-setup.in @@ -793,6 +793,16 @@ debug "final pgport: $pgport" script_result=0 +if @MOUNTPOINT@ -q "$pgdata" || @MOUNTPOINT@ -q "$(dirname "$pgdata")"; then + warn $"Note that either your data directory '$pgdata' or" + warn_q $"the parent directory '$(dirname "$pgdata")'" + warn_q $"is a direct mountpoint. This is usually bad idea and your" + warn_q $"filesystem layout should ideally look like:" + warn_q $"/ROOT_OWNED_MOUNTPOINT/POSTGRES_OWNED_DIRECTORY/DATADIR." + warn_q $"See the upstream documentation for more info:" + warn_q $"http://www.postgresql.org/docs/@PGMAJORVERSION@/static/creating-cluster.html" +fi + # See how we were called. case "$option_mode" in initdb) |