55.41. Global Views for Distributed System #

Postgres Pro Shardman has a list of global views based on the corresponding local views. The definition of global view columns is the same as in its corresponding local view. Fetching from a global view returns a union of rows from the corresponding local views. The rows are fetched from each of their cluster nodes. Another difference is that the global views have an added column rgid. The rgid value shows the replication group ID of the cluster node from which a row is fetched.

55.41.1. Global Views for Statistics #

Below is the list of the statistics-related global views with links to their corresponding local views:

Table 55.41. Statistics-related global and local views

Global viewLocal viewDescription
shardman.gv_statspg_stats One row per planner statistics.
shardman.gv_stats_extpg_stats_ext Provides access to information about each extended statistics object in the database.
shardman.gv_stats_ext_exprspg_stats_ext_exprs Provides access to information about all expressions included in extended statistics objects.
shardman.gv_stat_activitypg_stat_activityOne row per server process, showing information related to the current activity of that process.
shardman.gv_stats_vacuum_databasepg_stats_vacuum_database One row for each index in the current database (including TOAST table indexes), showing statistics about vacuuming that specific index.
shardman.gv_stats_vacuum_indexespg_stats_vacuum_indexes One row for each database in the current cluster, showing statistics about vacuuming that database.
shardman.gv_stats_vacuum_tablespg_stats_vacuum_tables One row for each table in the current database (including TOAST tables), showing statistics about vacuuming that specific table.
shardman.gv_stat_replicationpg_stat_replicationOne row per WAL sender process, showing statistics about replication to that sender's connected standby server.
shardman.gv_stat_replication_slotspg_stat_replication_slotsOne row per replication slot, showing statistics about the replication slot's usage.
shardman.gv_pgpro_stat_wal_activitypgpro_stat_wal_activity One row per server process, showing information related to the current activity of that process.
shardman.gv_stat_subscriptionpg_stat_subscription One row per subscription for main worker (with null PID if the worker is not running), and additional rows for workers handling the initial data copy of the subscribed tables.
shardman.gv_stat_subscription_statspg_stat_subscription_stats One row per subscription.
shardman.gv_stat_sslpg_stat_sslOne row per backend or WAL sender process, showing statistics about SSL usage on this connection.
shardman.gv_stat_gssapipg_stat_gssapiOne row per backend, showing information about GSSAPI usage on this connection.
shardman.gv_stat_archiverpg_stat_archiverOne row only, showing statistics about the WAL archiver process's activity.
shardman.gv_stat_iopg_stat_ioOne row only for each combination of backend type, target I/O object, and I/O context, showing cluster-wide I/O statistics.
shardman.gv_stat_bgwriterpg_stat_bgwriterOne row only, showing statistics about the background writer process's activity.
shardman.gv_stat_progress_analyzepg_stat_progress_analyzeOne row for each backend (including autovacuum worker processes) running ANALYZE, showing current progress.
shardman.gv_stat_progress_basebackuppg_stat_progress_basebackupOne row for each WAL sender process streaming a base backup, showing current progress.
shardman.gv_stat_progress_clusterpg_stat_progress_clusterOne row for each backend running CLUSTER or VACUUM FULL, showing current progress.
shardman.gv_stat_checkpointerpg_stat_checkpointerOne row only, containing data about the checkpointer process of the cluster.
shardman.gv_statistic_extpg_statistic_ext Extended planner statistics (definition).
shardman.gv_stat_progress_create_indexpg_stat_progress_create_index One row for each backend running CREATE INDEX or REINDEX, showing current progress.
shardman.gv_stat_progress_vacuumpg_stat_progress_vacuum One row for each backend (including autovacuum worker processes) that is currently vacuuming
shardman.gv_stat_progress_copypg_stat_progress_copyOne row for each backend running COPY, showing current progress.
shardman.gv_stat_walpg_stat_walOne row only, showing statistics about WAL activity.
shardman.gv_stat_databasepg_stat_databaseOne row per database, showing database-wide statistics about query cancels due to conflict with recovery on standby servers.
shardman.gv_stat_database_conflictspg_stat_database_conflictsOne row per database, showing database-wide statistics about query cancels occurring due to conflicts with recovery on standby servers. This view will only contain information on standby servers, since conflicts do not occur on primary servers.
shardman.gv_stat_all_tablespg_stat_all_tablesOne row for each table in the current database, showing statistics about accesses to that specific table.
shardman.gv_stat_sys_tablespg_stat_sys_tables Same as pg_stat_sys_tables, only as a global view.
shardman.gv_stat_user_tablespg_stat_user_tables Same as pg_stat_user_tables, only as a global view.
shardman.gv_stat_all_indexespg_stat_all_indexesOne row for each index in the current database, showing statistics about accesses to that specific index.
shardman.gv_stat_sys_indexespg_stat_sys_indexes Same as pg_stat_sys_indexes, only as a global view.
shardman.gv_stat_user_indexespg_stat_user_indexes Same as pg_stat_user_indexes, only as a global view.
shardman.gv_statio_all_tablespg_statio_all_tablesOne row for each table in the current database, showing statistics about I/O on that specific table.
shardman.gv_statio_sys_tablespg_statio_sys_tables Same as pg_statio_sys_tables, only as a global view.
shardman.gv_statio_user_tablespg_statio_user_tables Same as pg_statio_user_tables, only as a global view.
shardman.gv_statio_all_indexespg_statio_all_indexesOne row for each index in the current database, showing statistics about I/O on that specific index.
shardman.gv_statio_sys_indexespg_statio_sys_indexes Same as pg_statio_sys_indexes, only as a global view.
shardman.gv_statio_user_indexespg_statio_user_indexes Same as pg_statio_user_indexes, only as a global view.
shardman.gv_statio_all_sequencespg_statio_all_sequencesOne row for each sequence in the current database, showing statistics about I/O on that specific sequence.
shardman.gv_statio_sys_sequencespg_statio_sys_sequences Same as pg_statio_sys_sequences, eonly as a global view.
shardman.gv_statio_user_sequencespg_statio_user_sequences Same as pg_statio_user_sequences, only as a global view.
shardman.gv_stat_user_functionspg_stat_user_functionsOne row for each tracked function, showing statistics about executions of that function.
shardman.gv_stat_slrupg_stat_slruOne row per SLRU, showing statistics of operations.
shardman.gv_stat_csnshardman.pg_stat_csnOne row showing statistics on delays that take place during import of CSN snapshots.
shardman.gv_stat_monitorshardman.pg_stat_monitorOne row showing metrics of the Postgres Pro Shardman monitor.
shardman.gv_stat_netusageshardman.pg_stat_net_usageOne row showing the cumulative network traffic between Postgres Pro Shardman cluster nodes.
shardman.gv_stat_xact_timeshardman.pg_stat_xact_timeOne row showing statistics for the time spent on a transaction.
shardman.gv_lock_graphshardman.lock_graph One row showing a graph of locks between processes on Postgres Pro Shardman cluster nodes including external locks. This view is based on the pg_locks and pg_prepared_xacts system views and on the pg_stat_activity view of the cumulative statistics system.
shardman.gv_stat_foreign_bytesshardman.pg_stat_foreign_stat_bytesOne row showing the amount of statistics for foreign relations transferred over the network between Postgres Pro Shardman cluster nodes.
shardman.gv_stat_recovery_prefetch pg_stat_recovery_prefetch One row, the columns wal_distance, block_distance and io_depth show current values, and the other columns show cumulative counters that can be reset with the pg_stat_reset_shared function.
shardman.gv_stat_wal_receiverpg_stat_wal_receiver One row, showing statistics about the WAL receiver from that receiver's connected server.
shardman.gv_stat_xact_all_tablespg_stat_xact_all_tables Similar to pg_stat_all_tables, but counts actions taken so far within the current transaction (which are not yet included in pg_stat_all_tables and related views). The columns for numbers of live and dead rows and vacuum and analyze actions are not present in this view.
shardman.gv_stat_xact_sys_tablespg_stat_xact_sys_tables Same as pg_stat_xact_sys_tables, only as a global view.
shardman.gv_stat_xact_user_tablespg_stat_xact_user_tables Same as pg_stat_xact_user_tables, only as a global view
shardman.gv_stat_xact_user_functionspg_stat_xact_user_functions Similar to pg_stat_user_functions, but counts only calls during the current transaction (which are not yet included in pg_stat_user_functions).
shardman.gv_sharded_tables  Displays information on all the sharded tables in the cluster.
shardman.gv_global_tables  Displays information on all the global tables in the cluster.

55.41.2. Global Views for System Calalog and System Views #

Below is the list of the global views that relate to the system catalog and system views, and links to their corresponding local views:

Table 55.42. Global and local views for system catalog and system views

Global viewLocal viewDescription
shardman.gv_aggregatepg_aggregate Stores information about aggregate functions
shardman.gv_ampg_am Relation access methods
shardman.gv_amoppg_amop Access method operators
shardman.gv_amprocpg_amproc Access method support functions
shardman.gv_attrdefpg_attrdef Column default values
shardman.gv_attributepg_attribute Table columns (attributes)
shardman.gv_auth_memberspg_auth_members Authorization identifier membership relationships
shardman.gv_available_extension_versionspg_available_extension_versions Specific extension versions that are available for installation
shardman.gv_available_extensionspg_available_extensions Extensions that are available for installation
shardman.gv_castpg_cast Casts (data type conversions)
shardman.gv_classpg_class Tables, indexes, sequences, views (relations)
shardman.gv_collationpg_collation Collations (locale information)
shardman.gv_configpg_config Compile-time configuration parameters of the currently installed version of Postgres Pro
shardman.gv_constraintpg_constraint Check constraints, unique constraints, primary key constraints, foreign key constraints
shardman.gv_conversionpg_conversion Encoding conversion information
shardman.gv_databasepg_database Databases within this database cluster
shardman.gv_db_role_settingpg_db_role_setting Per-role and per-database settings
shardman.gv_default_aclpg_default_acl Default privileges for object types
shardman.gv_dependpg_depend Dependencies between database objects
shardman.gv_descriptionpg_descriptionDescriptions or comments on database objects
shardman.gv_enumpg_enum Enum label and value definitions
shardman.gv_event_triggerpg_event_trigger Event triggers
shardman.gv_extensionpg_extension Installed extensions
shardman.gv_file_settingspg_file_settings Installed extensions
shardman.gv_foreign_data_wrapperpg_foreign_data_wrapper Foreign-data wrapper definitions
shardman.gv_foreign_serverpg_foreign_server Foreign server definitions
shardman.gv_foreign_tablepg_foreign_table Additional foreign table information
shardman.gv_grouppg_group Exists for backwards compatibility: it emulates a catalog that existed in PostgreSQL before version 8.1
shardman.gv_hba_file_rulespg_hba_file_rules Summary of the contents of the client authentication configuration file pg_hba.conf
shardman.gv_ident_file_mappingspg_ident_file_mappings Summary of the contents of the client user name mapping configuration file pg_hba.conf
shardman.gv_indexpg_index Additional index information
shardman.gv_indexespg_indexes Provides access to useful information about each index in the database
shardman.gv_inheritspg_inherits Table inheritance hierarchy
shardman.gv_init_privspg_init_privs Object initial privileges
shardman.gv_languagepg_language Languages for writing functions
shardman.gv_largeobjectpg_largeobject Data pages for large objects
shardman.gv_largeobject_metadatapg_largeobject_metadata Metadata associated with large objects
shardman.gv_matviewspg_matviews Provides access to useful information about each materialized view in the database
shardman.gv_namespacepg_namespace Schemas
shardman.gv_opclasspg_opclass Access method operator classes
shardman.gv_operatorpg_operator Operators
shardman.gv_opfamilypg_opfamily Access method operator families
shardman.gv_parameter_aclpg_parameter_acl Configuration parameters for which privileges have been granted
shardman.gv_partitioned_tablepg_partitioned_table Information about partition key of tables
shardman.gv_procpg_proc Functions and procedures
shardman.gv_profilepg_profile Profiles, a set of authentication restrictions
shardman.gv_publicationpg_publication Publications for logical replication
shardman.gv_publication_namespacepg_publication_namespace Schema to publication mapping
shardman.gv_publication_relpg_publication_rel Relation to publication mapping
shardman.gv_publication_tablespg_publication_tables Information about the mapping between publications and information of tables they contain
shardman.gv_rangepg_range Information about range types
shardman.gv_replication_originpg_replication_origin Registered replication origins
shardman.gv_replication_origin_statuspg_replication_origin_status Information about how far replay for a certain origin has progressed
shardman.gv_replication_slotspg_replication_slots Provides a listing of all replication slots that currently exist on the database cluster, along with their current state
shardman.gv_rewritepg_rewrite Query rewrite rules
shardman.gv_rulespg_rules Provides access to useful information about query rewrite rules
shardman.gv_seclabelpg_seclabel Security labels on database objects
shardman.gv_seclabelspg_seclabels Provides information about security labels
shardman.gv_sequencepg_sequence Information about sequences
shardman.gv_sequencespg_sequences Provides access to useful information about each sequence in the database
shardman.gv_settingspg_settings Provides access to run-time parameters of the server
shardman.gv_shdependpg_shdepend Dependencies on shared objects
shardman.gv_shdescriptionpg_shdescription Comments on shared objects
shardman.gv_shseclabelpg_shseclabel Security labels on shared database objects
shardman.gv_subscriptionpg_subscription Logical replication subscriptions
shardman.gv_subscription_relpg_subscription_rel Relation state for subscriptions
shardman.gv_tablespacepg_tablespace Tablespaces within this database cluster
shardman.gv_tablespg_tables Provides access to useful information about each table in the database
shardman.gv_prepared_xactspg_prepared_xacts Provides information about transactions that are currently prepared for two-phase commit
shardman.gv_timezone_namespg_timezone_names List of time zone names that are recognized by SET TIMEZONE, along with their associated abbreviations, UTC offsets, and daylight-savings status
shardman.gv_timezone_abbrevspg_timezone_abbrevs List of time zone abbreviations that are currently recognized by the datetime input routines
shardman.gv_transformpg_transform Transforms (data type to procedural language conversions)
shardman.gv_triggerpg_trigger Triggers
shardman.gv_ts_configpg_ts_config Text search configurations
shardman.gv_ts_config_mappg_ts_config_map Text search configurations' token mappings
shardman.gv_ts_dictpg_ts_dict Text search dictionaries
shardman.gv_ts_parserpg_ts_parser Text search parsers
shardman.gv_ts_templatepg_ts_template Text search templates
shardman.gv_typepg_type Data types
shardman.gv_user_mappingpg_user_mapping Mappings of users to foreign servers
shardman.gv_user_mappingspg_user_mappings Provides access to information about user mappings
shardman.gv_viewspg_views Provides access to useful information about each view in the database
shardman.gv_wait_eventspg_wait_events Provides description about the wait events
shardman.gv_lockspg_locks Provides access to information about the locks held by active processes within the database server.
shardman.gv_shmem_allocationspg_shmem_allocations Shows allocations made from the server's main shared memory segment.