Method for collecting full amount of Postgres table

The invention particularly relates to a method for collecting the total amount of a Postgres table. According to the Postgres table total acquisition method, data change is captured through an incremental log, and a certain record in a table is quickly positioned through ctid; the method comprises t...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: DENG GUANGCHAO, TANG XIAODONG, FANG JIANXUN
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention particularly relates to a method for collecting the total amount of a Postgres table. According to the Postgres table total acquisition method, data change is captured through an incremental log, and a certain record in a table is quickly positioned through ctid; the method comprises the following steps of: acquiring a fragment interval through data sampling table sample, wherein a bernoulli function provided by a programmer PG is used as a sampling function; the source end database and the acquisition end program use a synchronous auxiliary table to record the condition and the execution condition of each fragment, wherein the synchronous auxiliary table comprises a Tableinfos table and a Tableshards table; and according to the state data in the two synchronization auxiliary tables, timely updating is carried out during synchronization, fragments of the to-be-synchronized tables are obtained circularly, and full data synchronization of all the tables of the whole task is completed. According to