Setting up and switching PostgreSQL active/standby environment on Linux

Database hot standby: Database hot standby refers to the creation, maintenance, and monitoring of one or more standby databases for the primary database. They are always on and kept synchronized with the host. When the host fails, the hot standby database can be enabled at any time to protect the data from failures, disasters, errors, and crashes.