diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2015-03-17 13:19:54 +0100 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2015-03-17 13:52:51 +0100 |
commit | 124140f530d07a951a96be21d1a3cce406c38f0b (patch) | |
tree | c2e1bd62578dd696d850023ade576aa182df73fb /postgresql-ctl.in | |
parent | 0b6671ae8a2fc23f68cf1500be34345d39c5bc56 (diff) | |
download | postgresql-setup-124140f530d07a951a96be21d1a3cce406c38f0b.tar.gz postgresql-setup-124140f530d07a951a96be21d1a3cce406c38f0b.tar.xz postgresql-setup-124140f530d07a951a96be21d1a3cce406c38f0b.zip |
postgresql-setup: better error handling
Fix the bug in handling with already initialized data directory.
Now, when doing --upgrade, postgresql-setup does not try to
re-initialize already initialized PGDATA directory and, after
"this" unsuccessful initdb, the datadir is not removed.
* postgresql-setup.in (check_not_initialized): New function.
(perform_initdb): Simplify return value handling.
(initdb): Use check_not_initialized function.
(upgrade): Use check_not_initialized to avoid PGDATA removal. When
$cleanup is false, don't remove $PGDATA.
Diffstat (limited to 'postgresql-ctl.in')
0 files changed, 0 insertions, 0 deletions