Method and system for solving PostgreSQL database table expansion based on Undo table space
The embodiment of the invention discloses a method and system for solving PostgreSQL database table expansion based on an Undo table space. The method comprises the steps that when it is monitored that a PostgreSQL database is subjected to data updating, an original data line is copied to the Undo t...
Saved in:
Main Authors | , , , , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
21.10.2022
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The embodiment of the invention discloses a method and system for solving PostgreSQL database table expansion based on an Undo table space. The method comprises the steps that when it is monitored that a PostgreSQL database is subjected to data updating, an original data line is copied to the Undo table space, a new version data line is generated through data updating, and an Undo pointer is stored in the line header of the new version data line; in response to transaction rollback of the PostgreSQL database, copying the original data row from the Undo table space to the original place; in response to the situation that all sessions do not need to access the original data rows of the Undo table space any more, the original data rows are cleaned, and the Undo table space is released; on one hand, the problems of index expansion and table expansion of the PostgreSQL can be solved.
本发明实施例公开了一种基于Undo表空间解决PostgreSQL数据库表膨胀方法及系统,其中方法包括:监测到PostgreSQL数据库发生数据更新,将所述原始数据行拷贝到Undo表空间,数据更新产生新版本数据行,于所述新版本数据行的行头存储Undo指针;响应于所述 |
---|---|
Bibliography: | Application Number: CN202210852201 |