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

GS_SEG_EXTENTS

GS_SEG_EXTENTS displays extent information about all tablespaces. This view displays all extents of user segments, including segment heads, fork heads, and level-1 pages in file 1 and data extents in files 2 to 5. Only an administrator can query the information.

Table 1 GS_SEG_EXTENTS columns

Name

Type

Description

node_name

text

Node name.

tablespace_name

name

Tablespace to which a segment object belongs.

bucketnode

integer

  • 0 to 1023 indicate the bucket nodes of a hash bucket table.
  • 1024 indicates the bucket node of a segment-page ordinary table.
  • 1025 indicates the bucket node of a segment-page global temporary table.
  • 1026 indicates the bucket node of a segment-page unlogged table.
  • 1027 indicates the bucket node of a segment-page local temporary table.

head_block_id

bigint

Page number of the segment header.

extent_id

integer

Logical extent number.

file_id

integer

ID of the data file where the extent is located.

forknum

integer

Fork type of a segment object. Value range:

  • 0: main fork.
  • 1: fsm fork.
  • 2: vm fork.

block_id

bigint

Start page number in the data file where the extent is located.

blocks

integer

Extent size. The value can be 1, 8, 128, 1024, or 4096.

usage_type

text

Usage type of the extension. Value range:
  • segment head: segment header.
  • fork head: fork header.
  • level1 page: level-1 page.
  • data extent: data extents.