Updated on 2024-06-07 GMT+08:00

Common View Tools

View Type

Type

Function

Application Scenario

Function

Parsing

All types

Parses a specified table page and returns the path for storing the parsed content.

  • Page information viewing
  • Tuple (non-user data) information
  • Damaged pages and tuples
  • Tuple visibility problems
  • Verification errors

gs_parse_page_bypath

Index recycle queue (URQ)

Parses key information in the URQ.

  • UB-tree index space expansion
  • UB-tree index space recycle exceptions
  • Verification errors

gs_urq_dump_stat

Rollback segment (undo)

Parses the specified undo record, excluding old tuple data.

  • Expanded undo space
  • Undo recycling exceptions
  • Rollback exceptions
  • Routine maintenance
  • Verification errors
  • Visibility judgment exceptions
  • Parameter modifications

gs_undo_dump_record

Parses all undo records generated by a specified transaction, excluding old tuple data.

gs_undo_dump_xid

Parses all information about transaction slots in a specified undo zone.

gs_undo_translot_dump_slot

Parses the transaction slot information of a specified transaction, including the XID and the range of undo records generated by the transaction.

gs_undo_translot_dump_xid

Parses the metadata of a specified undo zone and displays the pointer usage of undo records and transaction slots.

gs_undo_meta_dump_zone

Parses the undo space metadata corresponding to a specified undo zone and displays the file usage of undo records.

gs_undo_meta_dump_spaces

Parses the slot space metadata corresponding to a specified undo zone and displays the file usage of transaction slots.

gs_undo_meta_dump_slot

Parses the data page and all data of historical versions and returns the path for storing the parsed content.

gs_undo_dump_parsepage_mv

Write ahead log

(WAL)

Parses Xlog within the specified LSN range and returns the path for storing parsed content. You can use pg_current_xlog_location() to obtain the current Xlog position.

  • WAL errors
  • Log replay errors
  • Damaged pages

gs_xlogdump_lsn

Parses Xlog of a specified XID and returns the path for storing parsed content. You can use txid_current() to obtain the current XID.

gs_xlogdump_xid

Parses logs corresponding to a specified table page and returns the path for storing the parsed content.

gs_xlogdump_tablepath

Parses the specified table page and logs corresponding to the table page and returns the path for storing the parsed content. It can be regarded as one execution of gs_parse_page_bypath and gs_xlogdump_tablepath. The prerequisite for executing this function is that the table file exists. To view logs of deleted tables, call gs_xlogdump_tablepath.

gs_xlogdump_parsepage_tablepath

Collecting

Rollback segment (undo)

Displays the statistics of the Undo module, including the usage of undo zones and undo links, creation and deletion of undo module files, and recommended values of undo module parameters.

  • Undo space expansion
  • Undo resource monitoring

gs_stat_undo

Write ahead log

(WAL)

Collects statistics of the memory status table when WALs are written to disks.

  • WAL write/disk flushing monitoring
  • Suspended WAL write/disk flushing

gs_stat_wal_entrytable

Collects WAL statistics about the disk flushing status and location.

gs_walwriter_flush_position

Collects WAL statistic about the frequency of disk flushing, data volume, and flushing files.

gs_walwriter_flush_stat

Validation

Heap table/Index

Checks whether the disk page data of tables or index files is normal offline.

  • Damaged pages and tuples
  • Visibility issues
  • Log playback errors

ANALYZE VERIFY

Checks whether physical files of the current database in the current instance are lost.

Lost files

gs_verify_data_file

Index recycle (URQ)

Checks whether the data of the URQ (potential queue/available queue/single page) is normal.

  • UB-tree index space expansion
  • UB-tree index space reclamation exceptions

gs_verify_urq

Rollback segment (undo)

Checks whether undo records are normal offline.

  • Abnormal or damaged undo records
  • Visibility issues
  • Abnormal or damaged rollback

gs_verify_undo_record

Checks whether the transaction slot data is normal offline.

  • Abnormal or damaged undo records
  • Visibility issues
  • Abnormal or damaged rollback

gs_verify_undo_slot

Checks whether the undo metadata is normal offline.

  • Node startup failure caused by undo metadata
  • Undo space reclamation exceptions
  • Outdated snapshots

gs_verify_undo_meta

Restoration

Heap table/Index/Undo file

Restores lost physical files on the primary server based on the standby server.

Lost heap tables/Indexes/undo files

gs_repair_file

Heap table/Index/Undo page

Checks and restores damaged pages on the primary server based on the standby server.

Damaged heap tables/indexes/undo pages

gs_verify_and_tryrepair_page

Restores the pages of the primary server based on the pages of the standby server.

gs_repair_page

Modifies the bytes of the page backup based on the offset.

gs_edit_page_bypath

Overwrites the modified page to the target page.

gs_repair_page_bypath

Rollback segment (undo)

Rebuilds undo metadata. If the undo metadata is proper, rebuilding is not required.

Abnormal or damaged undo metadata

gs_repair_undo_byzone

Index recycle queue (URQ)

Rebuilds the URQ.

Abnormal or damaged URQ

gs_repair_urq