38.5. pga_storage #

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 associated with creating the storage, from the pga_snapshot metadata table.

end_snapshot

BIGINT

Foreign key

The snapshot associated with deleting the storage, from the pga_snapshot metadata table.

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 the metadata of storages. Deleted storages are associated with end_snapshot values to indicate that these storages can no longer be used.

This allows you 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 structures 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 structures 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 metastore.add_storage stored procedure or any stored procedure that requires removing temporary files from the directory specified by the tmp_uri value.

Default value: 10 Gb.

uri_id

BIGINT

Foreign key, NOT NULL, UNIQUE

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

tmp_uri_id

BIGINT

Foreign key, NOT NULL, UNIQUE

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

proxy_table_id

BIGINT

NOT NULL, UNIQUE

The ID of the proxy table associated with the storage, from the pga_proxy_table metadata table.