Jump to content
Fórum Script Brasil
  • 0

Problema quando atualizo o Postgres


Question

yum remove -y  postgresql*
yum install -y postgresql10-server-10.9 postgresql10-10.9 postgresql10-libs-10.9
sudo /usr/pgsql-10/bin/postgresql-10-setup initdb
sudo systemctl enable postgresql-10
sudo systemctl start postgresql-10
sudo  systemctl stop postgresql-10
sudo chown postgres:postgres /pg_data/ -R

sudo su - postgres -c '/usr/pgsql-10/bin/initdb -D /pg_data/'

Altero o arquivo.

sudo nano /usr/lib/systemd/system/postgresql-10.service

PGDATA=/data/

sudo  /usr/pgsql-10/bin/postgresql-10-setup initdb

Segui todos os passos anteriores para mudar o data de diretório.
Problema que quando eu atualizo o postgres pelo yum para novas versões, ele altera o caminho do postgresql-10.service, de Environment=PGDATA=/data/postgresql/data/ para Environment=PGDATA=/var/lib/pgsql/10/data/ voltando ao padrão,
tem alguma forma de não alterar quando atualizar pelo yum ?

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148690
    • Total Posts
      644529
×
×
  • Create New...