Method for realizing high availability of PostgreSQL

An implementation method and high-availability technology, applied in the database field, can solve problems such as failure to realize automatic failover, low availability, and long time

Pending Publication Date: 2020-10-23
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF0 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] 2) Manual processing is complex
[0010] Once the main database is down, manual processing is required, including selecting a new main database, compensating for difference data, restoring the new cluster, and modifying the client configuration. The operation steps are complex and time-consuming
[0011] 3) Data loss
[0016] 1) The main database failure cannot be automatically switched
[0017] Once the main library fails, manual intervention ...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for realizing high availability of PostgreSQL

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0062] Below will combine the appended in the embodiment of the present invention figure 1, clearly and completely describe the technical solutions in the embodiments of the present invention, obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0063] as attached figure 1 Shown, the realization system of a kind of PostgreSQL high availability of the present invention is characterized in that, this system comprises five parts of client, sentinel unit, agent unit, PostgreSQL cluster and storage unit;

[0064] The client reads the information on the storage unit through the proxy unit, thereby accessing the database cluster;

[0065] The sentinel unit monitors the active status of the main library and the sla...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for realizing high availability of PostgreSQL, the method is applied to a system for realizing high availability of PostgreSQL, and the system comprises a client, an agent unit, a sentry unit, a PostgreSQL cluster and a storage unit. The agent unit, the sentry unit and the PostgreSQL cluster register own unit information into the storage unit, the agent unit is anaccess point of the client, and the agent unit is always connected to the main library of the management unit by reading the information on the storage unit; the sentry unit monitors the survival states of the master library and the slave library in real time by reading the information on the storage unit, if the master library breaks down, automatic switching of the master library fault is achieved, difference data are compensated in the switching process, and therefore it is guaranteed that data are not lost when the master library breaks down. Wherein the database cluster is a hierarchicaldatabase master-slave replication cluster. According to the invention, automatic switching of main library faults can be realized, and data loss is avoided.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method for realizing high availability of PostgreSQL. Background technique [0002] The hierarchical database is a high-performance database based on the LSM algorithm, and the data is stored on the hard disk according to different levels. The database supports master-slave replication architecture, which is divided into master database nodes and slave database nodes. The master database generates incremental logs in real time, and the slave database synchronizes the master database incremental logs in real time. The current position of the incremental logs is called the synchronization offset; The data on the master database that is not synchronized to the slave database is called differential data, which can be obtained through the interface of the hierarchical database itself; in general, the synchronization offsets of the master database and the slave database are the sam...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/27G06F16/28G06F9/455
CPCG06F16/27G06F16/282G06F9/45558
Inventor 王凯利赵山王阳
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products