Обсуждение: Convert hot_standby 9.4 postgresql into standalone server
Hello, we currently have 9.4 hot_standby master-slave pair. Going forward, we can keep only one server. How can I convert the system properly?
These are some snippets from master postgresql.conf file:
==================================
wal_level = hot_standby # minimal, archive, hot_standby, or logical
# (change requires restart)
checkpoint_segments = 16
wal_keep_segments = 512
max_wal_senders = 16 # max number of walsender processes
# (change requires restart)
max_replication_slots = 12 # max number of replication slots===================================
Is it enough if I do the following:
1) backup all dbs on master
2) shutdown both servers
3) update max_replication_slots=0 in postgresql.conf on master
4) update wal_level = minimal in postgresql.conf on master
4) start master
Do I need to do anything else? Thank you for your help
On Tuesday, July 14, 2020, Julie Nishimura <juliezain@hotmail.com> wrote:
Hello, we currently have 9.4 hot_standby master-slave pair. Going forward, we can keep only one server. How can I convert the system properly?
If you are keeping the primary you shouldn’t have to do anything. The absence of a secondary server shouldn’t impact the primary. You might be recording more detail to WAL than strictly necessary but that isn’t wrong outright.
David J.
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Tuesday, July 14, 2020, Julie Nishimura <juliezain@hotmail.com> wrote: >> Hello, we currently have 9.4 hot_standby master-slave pair. Going forward, >> we can keep only one server. How can I convert the system properly? > If you are keeping the primary you shouldn’t have to do anything. The > absence of a secondary server shouldn’t impact the primary. You might be > recording more detail to WAL than strictly necessary but that isn’t wrong > outright. Yeah. What you *do* need to think about is, if you no longer have a standby server, what's your disaster recovery plan in case the primary fails? You need to have some good backup procedures in place. regards, tom lane