pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: alertas.dba@click-it.es
Subject: BUG #15108: Initialization problem postgresql-10-setup initdb
Date: Tue, 13 Mar 2018 12:12:16 +0000
Message-ID: <152094313655.1225.9005657715834235284@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15108
Logged by:          Alertas DBA
Email address:      alertas.dba@click-it.es
PostgreSQL version: 10.3
Operating system:   Centos 7.4.1708
Description:        

The problem is reported when executing database initialization command,
postgresql-10-setup initdb.
In the official documentation
(https://www.postgresql.org/docs/10/static/app-initdb.html) indicates that
it must be executed with the user postgres, but the command only works if I
execute it as root.

This command does not seem to interpret the parameter step indicated in the
documentation, these are the problem:

(run as root) yum install -y
https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
(run as root) yum install -y postgresql10 postgresql10-server
(run as root) cd /
(run as root) mkdir data
(run as root) chown -R postgres.postgres data
(run as postgres) /usr/pgsql-10/bin/postgresql-10-setup initdb
-bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D /data -A trust -U
postgres
systemctl: invalid option -- 'D'
failed to find PGDATA setting in -D.service

-bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb -D /data/ -A trust
-U postgres
systemctl: invalid option -- 'D'
failed to find PGDATA setting in -D.service

-bash-4.2$ /usr/pgsql-10/bin/postgresql-10-setup initdb --pgadata=/data/ -A
trust -U postgres
systemctl: unrecognized option '--pgadata=/data/.service'
failed to find PGDATA setting in --pgadata=/data/.service

Should the environment variable PGDATA in
/usr/lib/systemd/system/postgresql-10.service be overwrited after the
database is initialized?



view thread (6+ messages)  latest in thread

Message-ID: <152094313655.1225.9005657715834235284@wrigleys.postgresql.org>
Permalink:  ../152094313655.1225.9005657715834235284@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/152094313655.1225.9005657715834235284@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, alertas.dba@click-it.es
  Subject: Re: BUG #15108: Initialization problem postgresql-10-setup initdb
  In-Reply-To: <152094313655.1225.9005657715834235284@wrigleys.postgresql.org>
  References: <152094313655.1225.9005657715834235284@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox