In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Screenshot of error:
Pg_basebackup: could not get write-ahead log end position from server: ERROR: could not open file ". / .postgresql.conf.swn": Permission denied
1. Environment preparation: [production environment] 1. Master PG host IP: 172.17.16.16 host name:hkzbxdb1Standby PG host IP:172.17.16.18 host name:hkzbxdb22, PG Cluster ideal environment is the same version, so the master / slave library version is as follows:
3. Stop Firewalls firewall [active / standby], initialize PG database [active / standby], iptables rule configuration [if you use / active / standby]; 4. Master host configuration: pg_hba.conf and postgresql.conf; create replication role account repl
File path: / var/lib/pgsql/11/data/pg_hba.conf configuration pg_hba.confkeepalives parameter is not required, mainly to monitor the use of TCP connection status
/ var/lib/pgsql/11/data/postgresql.conf
Configure stream replication function WAL archive this part can not be configured, of course, we can also adopt the disaster recovery scheme of "stream replication + WAL continuous archiving"
These replication parameters are important. You can adjust the parameters according to your own needs. For more details, please refer to the official website document https://www.postgresql.org/docs/11/warm-standby.html:
Remarks: "WAL knowledge points reference information, from PG official website"
So far, the environment is ready. Theoretical preparation to start stream replication in Streaming Replication, the three processes work together. A procedure on the walsender primary server sends WAL data to the standby server; then the walreceiver and the startup process on the standby server receive and replay the data. Walsender and walreceiver communicate using a single TCP connection. Startup sequence diagram of stream replication:
(1) start the primary server and standby server. (2) the standby server starts the startup process. (3) the standby server starts the walreceiver process. (4) walreceiver sends a connection request to the master server. If the primary server is not running, walreceiver sends these requests periodically. (5) when the master server receives a connection request, it starts the walsender process and establishes a TCP connection between walsender and walreceiver. (6) walreceiver sends the latest LSN of the standby database cluster. Generally speaking, this stage is called the handshake in the field of information technology. (7) if the standby latest LSN is less than the primary latest LSN (standby LSN)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 298
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.