27.5. pga_storage Metadata Table #

This metadata table contains information about storages.

Column Name

Column Type

Constraint

Description

storage_id

BIGINT

Primary key

The storage ID assigned by increasing the next_catalog_id value of the pga_snapshot metadata table.

begin_snapshot

BIGINT

Foreign key, NOT NULL

The snapshot from the pga_snapshot metadata table associated with the storage creation date and time.

end_snapshot

BIGINT

Foreign key

The snapshot from the pga_snapshot metadata table associated with the storage deletion date and time.

If the value is NULL, the storage is not deleted.

storage_name

VARCHAR

NOT NULL

The storage name, for example, my_storage.

storage_name values are not UNIQUE because pgpro_metastore does not delete metadata of storages. Deleted storages are rather associated with end_snapshot values to indicate that these storages can no longer be used.

If storage_name values were UNIQUE, you would not be able to create a new storage with the same name as a previously deleted storage.

uri

VARCHAR

NOT NULL, UNIQUE

The URI of the root storage directory.

Local storages have simple URIs, for example, file:///home/j.doe/workspace/axe/.

S3 storages have URIs with more complicated structure and parsing, for example, s3://premdb/team01.csv?versionId=w_B5qT8s5MkiT09.IRHay0lW.PycsHTS. These URIs are generated using third-party libraries.

tmp_uri

VARCHAR

NOT NULL, UNIQUE

The URI of the storage directory for temporary files.

Local storages have simple URIs, for example, file:///home/j.doe/workspace/axe/.

S3 storages have URIs with more complicated structure and parsing, for example, s3://premdb/team01.csv?versionId=w_B5qT8s5MkiT09.IRHay0lW.PycsHTS. These URIs are generated using third-party libraries.

storage_type

BIGINT

NOT NULL

The storage type.

Currently, local, network, and S3 storages are supported.

min_space

BIGINT

NOT NULL

The minimum free space for the storage, in bytes.

It is verified when executing the add_storage ETL operation or any operation that requires removing temporary files from the directory specified by the tmp_uri value.

uri_id

BIGINT

Foreign key, NOT NULL, UNIQUE

The ID of the URI from the pga_uri metadata table associated with the root storage directory.

tmp_uri_id

BIGINT

Foreign key, NOT NULL, UNIQUE

The ID of the URI from the pga_uri metadata table associated with the storage directory for temporary files.