Search Postgresql Archives

Re: Problem changing default data_directory in PG 9.6 + CentOS6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Oct 17, 2016 at 4:38 PM, Edilmar LISTAS <edilista@xxxxxxxxxxxxxxxx> wrote:
I have an env running a changed data_directory fine in a devel machine PG 9.4 using Fedora23.
Now, I have a server machine with CentOS where I downloaded the RPMs from repo https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm.
All the configs run fine if I doesn't change the default data_directory. But I need to use the path /sistemas/sat4/bdpg.

I did these commands:

mkdir /sistemas/sat4/bdpg
chown postgres /sistemas/sat4/bdpg
chmod 700 /sistemas/sat4/bdpg
su - postgres
/usr/pgsql-9.6/bin/initdb -D /sistemas/sat4/bdpg
exit

Then, I changed data_directory to /sistemas/sat4/bdpg and tried to restart PG:
service postgresql-9.6 restart
STOP => OK
START => FAILED

I disabled se_linux.
The file /var/lib/pgsql/9.6/pgstartup.log just said to see future output in pg_log.
The file data/pg_log/postgresql-Mon.log doesn't say anything about errors.

The strange is that startup arises a FAILED message, but the process "/usr/pgsql-9.6/bin/postmaster -D /var/lib/pgsql/9.6/data" is running (and the children logger/checkpointer/etc). But I don't get to connect using pgAdmin3. Then, I have to kill manually postmaster (because service script doesn't understand postmaster.pid in the new data dir), comment data_directory to use default place, start and connect to pgAdmin3. Then, start/stop/start/etc run fine lookup for postmaster.pid in /var/lib/pgsql/9.6/data.

What is the value of data_directory in postgresql.conf ?

Is there anything in /var/log/postgresql/{log_filename}   ... where {log_file} is the value set in postgresql.conf ?

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux