Migration method based on PostgreSQL block storage equipment

A block storage device and block device technology, applied in the input/output process of data processing, special data processing applications, instruments, etc., can solve problems such as security loopholes, data security cannot be guaranteed, and operators require high professional knowledge. Achieve the effect of improving reading and writing speed

Active Publication Date: 2016-08-03
深圳市华讯方舟光电技术有限公司 +1
View PDF8 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0023] First, the migration of databases between different systems is extremely complex, requiring high professional knowledge of operators
[0024] Second, the use of the disk must go through the file system layer
[0028] Third, the expansion of the file system is also very trou

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
  • Migration method based on PostgreSQL block storage equipment
  • Migration method based on PostgreSQL block storage equipment
  • Migration method based on PostgreSQL block storage equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0074] Such as Figure 4 As shown, the PostgreSQL block of the present invention is the smallest unit allocated to a data table in the PostgreSQL database system, and the storage capacity of the PostgreSQL block is equal to 4MB.

[0075] Of course, it may also be that the storage capacity of the PostgreSQL block is greater than 4KB.

[0076] It may also be that the storage capacity of the PostgreSQL block is a positive integer multiple of 8KB.

[0077] It may also be that the storage capacity of the PostgreSQL block is a natural number power of 2 of 8KB.

[0078] Furthermore, the storage capacity of the PostgreSQL block is 1MB, 2MB, 8MB, 16MB, 32MB, 64MB, 128MB, 256MB, 512MB or 1024MB.

Embodiment 2

[0080] Such as Figure 4 As shown, the PostgreSQL block storage device read-write module of the present invention is a PostgreSQL block storage device read-write module that manages the aforementioned PostgreSQL blocks in the PostgreSQL block storage device.

[0081] The read-write module of the PostgreSQL block storage device can be built on the PostgreSQL database system.

[0082] The read-write module of the PostgreSQL block storage device manages the PostgreSQL blocks in the PostgreSQL block storage device through the mapping relationship table between the PostgreSQL block and the data table and the free PostgreSQL block table.

[0083] The PostgreSQL block-data table mapping relationship table includes fields Relfilenode, Reltablespace, Forknum, Blockid, and Blockno, and the free PostgreSQL block table includes fields Blockid, Isfree, and Dev.

[0084] The PostgreSQL block storage device read-write module has the following submodules:

[0085] submodules that allocate P...

Embodiment 3

[0102] Such as Figure 4 As shown, the present invention is based on the migration method of the PostgreSQL block storage device, and uses the aforementioned PostgreSQL block storage device read-write module to read and write the aforementioned PostgreSQL block.

[0103] A. In the database background driver layer, the driver of the PostgreSQL block storage device read-write module completes the operation of the block file, and its main tasks are:

[0104] a. Manage the read-write interface of the upper-layer business to the underlying device through the file handle manager, so as to provide a high-concurrency read-write interface;

[0105] b. Realize the overwriting of the PostgreSQL block storage device, directly locate the specified location of the PostgreSQL block storage device, and write the data of the specified length;

[0106] B. Locate to a specified location of a specified block device according to the mapping relationship table oid and table space between the Postg...

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

PropertyMeasurementUnit
Storageaaaaaaaaaa
Login to view more

Abstract

The invention discloses a migration method based on PostgreSQL block storage equipment. The migration method comprises the following steps: performing reading/writing on a PostgreSQL block by using PostgreSQL block storage equipment reading/writing module, managing the PostgreSQL block in PostgreSQL block storage equipment by the PostgreSQL block storage equipment reading/writing module according to a mapping relationship table of PostgreSQL block-data table and an idle PostgreSQL block table, copying the mapping relationship table of the PostgreSQL block-data table and the idle PostgreSQL block table into a new database from an original database, and migrating the PostgreSQL block storage equipment into a computer where the new database is located from a computer where the original database is located. By adopting the migration method based on the PostgreSQL block storage equipment, databases can be very easily migrated among different systems, and special knowledge of operators is not highly required. The checking speed and the reading/writing speed can be greatly increased, and the speed can be increased by 10-20% under the condition of identical rear end storage. The increase is very considerable for the databases.

Description

technical field [0001] The invention relates to a migration method of a PostgreSQL database storage device, in particular to a migration method based on a PostgreSQL block storage device. Background technique [0002] With the development of the Internet, mobile Internet and the Internet of Things, we have ushered in an era of massive data, and more and more data are stored in the database, but the query time we need is getting smaller and smaller. Many application scenarios today require background storage with high concurrency, high capacity, and high response. The high-speed storage requirements force us to give up real-time indexing, and the data scanning of large data volumes is limited by the I / O on the storage side. In the current PostgreSQL database system, high-concurrency multi-database scans are basically random reads. At the same time, the throughput of ordinary disks can no longer meet the demand. [0003] In order to adapt to the application scenarios with a ...

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): G06F17/30G06F3/06
CPCG06F3/06G06F16/00G06F16/217G06F3/061G06F3/0631G06F3/0644G06F3/067G06F16/214
Inventor 朱晓伟
Owner 深圳市华讯方舟光电技术有限公司
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