t-matsuo / resource-agents

pgsql RA(ocf resource agent) for Pacemaker and PostgreSQL streaming replication. See https://github.com/t-matsuo/resource-agents/wiki
https://github.com/t-matsuo/resource-agents/wiki
GNU General Public License v2.0
118 stars 11 forks source link

Restart postgresql in cluster envirnment #10

Closed absolut777 closed 12 years ago

absolut777 commented 12 years ago

Hello Takatoshi,

I have question about restart postgresql when its works with cluster envirnment. For example I have changed postgres parameter which required restart. How I can correctly restart postgres in this case?

t-matsuo commented 12 years ago

How about "pg_ctl -D /path_to_pgdata reload" ? RA uses it too.

absolut777 commented 12 years ago

I mean change parameters for which require restart (they marked as "change requires restart" in postgresql.conf). For example parameter "listen_addresses". Reload with pg_ctl don't works for this case.

t-matsuo commented 12 years ago

Both node ?

assumption

steps

  1. stop pacemaker on #1
    • 2 becomes Master

  2. backup #2 data and restore it on #1
  3. change postgresql.conf on #1
  4. start pacemaker on #1
    • 1 becomes Slave

  5. stop pacemaker on #2
    • 1 becomes Master

  6. backup #1 data and restore it on #2
  7. change postgresql.conf on #2 8 start pacemaker on #2
    • 2 becomes Slave

done

absolut777 commented 12 years ago

Thank you!