↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

System Catalogs / Version comparison

What changed?

System Catalogs · PostgreSQL 14 → 15

Browse PG 15

5 added · 0 removed · 10 changed · 22 reworded · 0 with columns not listed. These are changes between the pinned reference snapshots. “Changed” means columns, their types, their order or a measured attribute such as NOT NULL; “reworded” means only the manual's descriptions.

rewordedpg_am
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The catalog pg_am stores information about relation access methods. There is one row for each access method supported by the system. Currently, only tables and indexes have access methods. The requirements for table and index access methods are discussed in detail in Chapter 61 and Chapter 62 respectively.
+(relation) The catalog pg_am stores information about relation access methods. There is one row for each access method supported by the system. Currently, only tables and indexes have access methods. The requirements for table and index access methods are discussed in detail in Chapter 63 and Chapter 64 respectively.
 oid: Row identifier
 amname: Name of the access method
 amhandler: OID of a handler function that is responsible for supplying information about the access method
rewordedpg_class
--- 14
+++ 15
@@ -14,13 +14,13 @@
 reltoastrelid: OID of the TOAST table associated with this table, zero if none. The TOAST table stores large attributes “out of line” in a secondary table.
 relhasindex: True if this is a table and it has (or recently had) any indexes
 relisshared: True if this table is shared across all databases in the cluster. Only certain system catalogs (such as pg_database) are shared.
-relpersistence: p = permanent table, u = unlogged table, t = temporary table
+relpersistence: p = permanent table/sequence, u = unlogged table/sequence, t = temporary table/sequence
 relkind: r = ordinary table, i = index, S = sequence, t = TOAST table, v = view, m = materialized view, c = composite type, f = foreign table, p = partitioned table, I = partitioned index
 relnatts: Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in pg_attribute. See also pg_attribute.attnum.
 relchecks: Number of CHECK constraints on the table; see pg_constraint catalog
 relhasrules: True if table has (or once had) rules; see pg_rewrite catalog
 relhastriggers: True if table has (or once had) triggers; see pg_trigger catalog
-relhassubclass: True if table or index has (or once had) any inheritance children
+relhassubclass: True if table or index has (or once had) any inheritance children or partitions
 relrowsecurity: True if table has row-level security enabled; see pg_policy catalog
 relforcerowsecurity: True if row-level security (when enabled) will also apply to table owner; see pg_policy catalog
 relispopulated: True if relation is populated (this is true for all relations other than some materialized views)
changedpg_collation
14 → 15
+ colliculocale  text
~ collcollate  name → text
~ collctype  name → text
~ collcollate  NOT NULL → nullable
~ collctype  NOT NULL → nullable
changedpg_constraint
14 → 15
+ confdelsetcols  smallint[]
rewordedpg_conversion
--- 14
+++ 15
@@ -3,7 +3,7 @@
 conname: Conversion name (unique within a namespace)
 connamespace: The OID of the namespace that contains this conversion
 conowner: Owner of the conversion
-conforencoding: Source encoding ID
-contoencoding: Destination encoding ID
+conforencoding: Source encoding ID (pg_encoding_to_char() can translate this number to the encoding name)
+contoencoding: Destination encoding ID (pg_encoding_to_char() can translate this number to the encoding name)
 conproc: Conversion function
 condefault: True if this is the default conversion
rewordedpg_cursors
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The pg_cursors view lists the cursors that are currently available. Cursors can be defined in several ways: via the DECLARE statement in SQL via the Bind message in the frontend/backend protocol, as described in Section 53.2.3 via the Server Programming Interface (SPI), as described in Section 47.1 The pg_cursors view displays cursors created by any of these means. Cursors only exist for the duration of the transaction that defines them, unless they have been declared WITH HOLD. Therefore non-holdable cursors are only present in the view until the end of their creating transaction.
+(relation) The pg_cursors view lists the cursors that are currently available. Cursors can be defined in several ways: via the DECLARE statement in SQL via the Bind message in the frontend/backend protocol, as described in Section 55.2.3 via the Server Programming Interface (SPI), as described in Section 47.1 The pg_cursors view displays cursors created by any of these means. Cursors only exist for the duration of the transaction that defines them, unless they have been declared WITH HOLD. Therefore non-holdable cursors are only present in the view until the end of their creating transaction.
 name: The name of the cursor
 statement: The verbatim query string submitted to declare this cursor
 is_holdable: true if the cursor is holdable (that is, it can be accessed after the transaction that declared the cursor has committed); false otherwise
changedpg_database
14 → 15
+ datlocprovider  "char"
+ daticulocale  text
+ datcollversion  text
- datlastsysoid  oid
~ datcollate  name → text
~ datctype  name → text
~ column order changed
rewordedpg_depend
--- 14
+++ 15
@@ -1,6 +1,6 @@
 (relation) The catalog pg_depend records the dependency relationships between database objects. This information allows DROP commands to find which other objects must be dropped by DROP CASCADE or prevent dropping in the DROP RESTRICT case. See also pg_shdepend, which performs a similar function for dependencies involving objects that are shared across a database cluster.
-classid: The OID of the system catalog the dependent object is in, or zero for a DEPENDENCY_PIN entry
-objid: The OID of the specific dependent object, or zero for a DEPENDENCY_PIN entry
+classid: The OID of the system catalog the dependent object is in
+objid: The OID of the specific dependent object
 objsubid: For a table column, this is the column number (the objid and classid refer to the table itself). For all other object types, this column is zero.
 refclassid: The OID of the system catalog the referenced object is in
 refobjid: The OID of the specific referenced object
addedpg_ident_file_mappings
--- 14
+++ 15
@@ -0,0 +1,5 @@
+line_number  integer
+map_name  text
+sys_name  text
+pg_username  text
+error  text
changedpg_index
14 → 15
+ indnullsnotdistinct  boolean
addedpg_parameter_acl
--- 14
+++ 15
@@ -0,0 +1,3 @@
+oid  oid
+parname  text
+paracl  aclitem[]
addedpg_publication_namespace
--- 14
+++ 15
@@ -0,0 +1,3 @@
+oid  oid
+pnpubid  oid
+pnnspid  oid
changedpg_publication_rel
14 → 15
+ prqual  pg_node_tree
+ prattrs  int2vector
changedpg_publication_tables
14 → 15
+ attnames  name[]
+ rowfilter  text
rewordedpg_seclabel
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The catalog pg_seclabel stores security labels on database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 52.84. See also pg_shseclabel, which performs a similar function for security labels of database objects that are shared across a database cluster.
+(relation) The catalog pg_seclabel stores security labels on database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 54.22. See also pg_shseclabel, which performs a similar function for security labels of database objects that are shared across a database cluster.
 objoid: The OID of the object this security label pertains to
 classoid: The OID of the system catalog this object appears in
 objsubid: For a security label on a table column, this is the column number (the objoid and classoid refer to the table itself). For all other object types, this column is zero.
rewordedpg_sequences
--- 14
+++ 15
@@ -9,4 +9,4 @@
 increment_by: Increment value of the sequence
 cycle: Whether the sequence cycles
 cache_size: Cache size of the sequence
-last_value: The last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. Null if the sequence has not been read from yet. Also, if the current user does not have USAGE or SELECT privilege on the sequence, the value is null.
+last_value: The last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence.
rewordedpg_settings
--- 14
+++ 15
@@ -13,6 +13,6 @@
 enumvals: Allowed values of an enum parameter (null for non-enum values)
 boot_val: Parameter value assumed at server startup if the parameter is not otherwise set
 reset_val: Value that RESET would reset the parameter to in the current session
-sourcefile: Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings); helpful when using include directives in configuration files
-sourceline: Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings).
+sourcefile: Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges of pg_read_all_settings); helpful when using include directives in configuration files
+sourceline: Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges of pg_read_all_settings).
 pending_restart: true if the value has been changed in the configuration file but needs a restart; or false otherwise.
rewordedpg_shdepend
--- 14
+++ 15
@@ -1,7 +1,7 @@
 (relation) The catalog pg_shdepend records the dependency relationships between database objects and shared objects, such as roles. This information allows PostgreSQL to ensure that those objects are unreferenced before attempting to delete them. See also pg_depend, which performs a similar function for dependencies involving objects within a single database. Unlike most system catalogs, pg_shdepend is shared across all databases of a cluster: there is only one copy of pg_shdepend per cluster, not one per database.
-dbid: The OID of the database the dependent object is in, or zero for a shared object or a SHARED_DEPENDENCY_PIN entry
-classid: The OID of the system catalog the dependent object is in, or zero for a SHARED_DEPENDENCY_PIN entry
-objid: The OID of the specific dependent object, or zero for a SHARED_DEPENDENCY_PIN entry
+dbid: The OID of the database the dependent object is in, or zero for a shared object
+classid: The OID of the system catalog the dependent object is in
+objid: The OID of the specific dependent object
 objsubid: For a table column, this is the column number (the objid and classid refer to the table itself). For all other object types, this column is zero.
 refclassid: The OID of the system catalog the referenced object is in (must be a shared catalog)
 refobjid: The OID of the specific referenced object
rewordedpg_shmem_allocations
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The pg_shmem_allocations view shows allocations made from the server's main shared memory segment. This includes both memory allocated by postgres itself and memory allocated by extensions using the mechanisms detailed in Section 38.10.10. Note that this view does not include memory allocated using the dynamic shared memory infrastructure.
+(relation) The pg_shmem_allocations view shows allocations made from the server's main shared memory segment. This includes both memory allocated by PostgreSQL itself and memory allocated by extensions using the mechanisms detailed in Section 38.10.10. Note that this view does not include memory allocated using the dynamic shared memory infrastructure.
 name: The name of the shared memory allocation. NULL for unused memory and <anonymous> for anonymous allocations.
 off: The offset at which the allocation starts. NULL for anonymous allocations, since details related to them are not known.
 size: Size of the allocation
rewordedpg_shseclabel
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The catalog pg_shseclabel stores security labels on shared database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 52.84. See also pg_seclabel, which performs a similar function for security labels involving objects within a single database. Unlike most system catalogs, pg_shseclabel is shared across all databases of a cluster: there is only one copy of pg_shseclabel per cluster, not one per database.
+(relation) The catalog pg_shseclabel stores security labels on shared database objects. Security labels can be manipulated with the SECURITY LABEL command. For an easier way to view security labels, see Section 54.22. See also pg_seclabel, which performs a similar function for security labels involving objects within a single database. Unlike most system catalogs, pg_shseclabel is shared across all databases of a cluster: there is only one copy of pg_shseclabel per cluster, not one per database.
 objoid: The OID of the object this security label pertains to
 classoid: The OID of the system catalog this object appears in
 provider: The label provider associated with this label.
rewordedpg_stat_archiver
--- 14
+++ 15
@@ -1,8 +1,8 @@
 (relation) The pg_stat_archiver view will always have a single row, containing data about the archiver process of the cluster.
 archived_count: Number of WAL files that have been successfully archived
-last_archived_wal: Name of the last WAL file successfully archived
-last_archived_time: Time of the last successful archive operation
+last_archived_wal: Name of the WAL file most recently successfully archived
+last_archived_time: Time of the most recent successful archive operation
 failed_count: Number of failed attempts for archiving WAL files
-last_failed_wal: Name of the WAL file of the last failed archival operation
-last_failed_time: Time of the last failed archival operation
+last_failed_wal: Name of the WAL file of the most recent failed archival operation
+last_failed_time: Time of the most recent failed archival operation
 stats_reset: Time at which these statistics were last reset
rewordedpg_stat_database
--- 14
+++ 15
@@ -6,8 +6,8 @@
 xact_rollback: Number of transactions in this database that have been rolled back
 blks_read: Number of disk blocks read in this database
 blks_hit: Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)
-tup_returned: Number of rows returned by queries in this database
-tup_fetched: Number of rows fetched by queries in this database
+tup_returned: Number of live rows fetched by sequential scans and index entries returned by index scans in this database
+tup_fetched: Number of live rows fetched by index scans in this database
 tup_inserted: Number of rows inserted by queries in this database
 tup_updated: Number of rows updated by queries in this database
 tup_deleted: Number of rows deleted by queries in this database
rewordedpg_stat_progress_analyze
--- 14
+++ 15
@@ -3,7 +3,7 @@
 datid: OID of the database to which this backend is connected.
 datname: Name of the database to which this backend is connected.
 relid: OID of the table being analyzed.
-phase: Current processing phase. See Table 28.35.
+phase: Current processing phase. See Table 28.37.
 sample_blks_total: Total number of heap blocks that will be sampled.
 sample_blks_scanned: Number of heap blocks scanned.
 ext_stats_total: Number of extended statistics.
rewordedpg_stat_progress_basebackup
--- 14
+++ 15
@@ -1,6 +1,6 @@
 (relation) Whenever an application like pg_basebackup is taking a base backup, the pg_stat_progress_basebackup view will contain a row for each WAL sender process that is currently running the BASE_BACKUP replication command and streaming the backup. The tables below describe the information that will be reported and provide information about how to interpret it.
 pid: Process ID of a WAL sender process.
-phase: Current processing phase. See Table 28.43.
+phase: Current processing phase. See Table 28.45.
 backup_total: Total amount of data that will be streamed. This is estimated and reported as of the beginning of streaming database files phase. Note that this is only an approximation since the database may change during streaming database files phase and WAL log may be included in the backup later. This is always the same value as backup_streamed once the amount of data streamed exceeds the estimated total size. If the estimation is disabled in pg_basebackup (i.e., --no-estimate-size option is specified), this is NULL.
 backup_streamed: Amount of data streamed. This counter only advances when the phase is streaming database files or transferring wal files.
 tablespaces_total: Total number of tablespaces that will be streamed.
rewordedpg_stat_progress_cluster
--- 14
+++ 15
@@ -4,7 +4,7 @@
 datname: Name of the database to which this backend is connected.
 relid: OID of the table being clustered.
 command: The command that is running. Either CLUSTER or VACUUM FULL.
-phase: Current processing phase. See Table 28.41.
+phase: Current processing phase. See Table 28.43.
 cluster_index_relid: If the table is being scanned using an index, this is the OID of the index being used; otherwise, it is zero.
 heap_tuples_scanned: Number of heap tuples scanned. This counter only advances when the phase is seq scanning heap, index scanning heap or writing new heap.
 heap_tuples_written: Number of heap tuples written. This counter only advances when the phase is seq scanning heap, index scanning heap or writing new heap.
rewordedpg_stat_progress_create_index
--- 14
+++ 15
@@ -5,7 +5,7 @@
 relid: OID of the table on which the index is being created.
 index_relid: OID of the index being created or reindexed. During a non-concurrent CREATE INDEX, this is 0.
 command: The command that is running: CREATE INDEX, CREATE INDEX CONCURRENTLY, REINDEX, or REINDEX CONCURRENTLY.
-phase: Current processing phase of index creation. See Table 28.37.
+phase: Current processing phase of index creation. See Table 28.39.
 lockers_total: Total number of lockers to wait for, when applicable.
 lockers_done: Number of lockers already waited for.
 current_locker_pid: Process ID of the locker currently being waited for.
rewordedpg_stat_progress_vacuum
--- 14
+++ 15
@@ -3,7 +3,7 @@
 datid: OID of the database to which this backend is connected.
 datname: Name of the database to which this backend is connected.
 relid: OID of the table being vacuumed.
-phase: Current processing phase of vacuum. See Table 28.39.
+phase: Current processing phase of vacuum. See Table 28.41.
 heap_blks_total: Total number of heap blocks in the table. This number is reported as of the beginning of the scan; blocks added later will not be (and need not be) visited by this VACUUM.
 heap_blks_scanned: Number of heap blocks scanned. Because the visibility map is used to optimize scans, some blocks will be skipped without inspection; skipped blocks are included in this total, so that this number will eventually become equal to heap_blks_total when the vacuum is complete. This counter only advances when the phase is scanning heap.
 heap_blks_vacuumed: Number of heap blocks vacuumed. Unless the table has no indexes, this counter only advances when the phase is vacuuming heap. Blocks that contain no dead tuples are skipped, so the counter may sometimes skip forward in large increments.
addedpg_stat_recovery_prefetch
--- 14
+++ 15
@@ -0,0 +1,10 @@
+stats_reset  timestamp with time zone
+prefetch  bigint
+hit  bigint
+skip_init  bigint
+skip_new  bigint
+skip_fpw  bigint
+skip_rep  bigint
+wal_distance  integer
+block_distance  integer
+io_depth  integer
rewordedpg_stat_subscription
--- 14
+++ 15
@@ -1,4 +1,4 @@
-(relation) The pg_stat_subscription view will contain 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.
+(relation) At least one row per subscription, showing information about the subscription workers. See pg_stat_subscription for details.
 subid: OID of the subscription
 subname: Name of the subscription
 pid: Process ID of the subscription worker process
addedpg_stat_subscription_stats
--- 14
+++ 15
@@ -0,0 +1,5 @@
+subid  oid
+subname  name
+apply_error_count  bigint
+sync_error_count  bigint
+stats_reset  timestamp with time zone
rewordedpg_statistic
--- 14
+++ 15
@@ -1,7 +1,7 @@
-(relation) The catalog pg_statistic stores statistical data about the contents of the database. Entries are created by ANALYZE and subsequently used by the query planner. Note that all the statistical data is inherently approximate, even assuming that it is up-to-date. Normally there is one entry, with stainherit = false, for each table column that has been analyzed. If the table has inheritance children, a second entry with stainherit = true is also created. This row represents the column's statistics over the inheritance tree, i.e., statistics for the data you'd see with SELECT column FROM table*, whereas the stainherit = false row represents the results of SELECT column FROM ONLY table. pg_statistic also stores statistical data about the values of index expressions. These are described as if they were actual data columns; in particular, starelid references the index. No entry is made for an ordinary non-expression index column, however, since it would be redundant with the entry for the underlying table column. Currently, entries for index expressions always have stainherit = false. Since different kinds of statistics might be appropriate for different kinds of data, pg_statistic is designed not to assume very much about what sort of statistics it stores. Only extremely general statistics (such as nullness) are given dedicated columns in pg_statistic. Everything else is stored in “slots”, which are groups of associated columns whose content is identified by a code number in one of the slot's columns. For more information see src/include/catalog/pg_statistic.h. pg_statistic should not be readable by the public, since even statistical information about a table's contents might be considered sensitive. (Example: minimum and maximum values of a salary column might be quite interesting.) pg_stats is a publicly readable view on pg_statistic that only exposes information about those tables that are readable by the current user.
+(relation) The catalog pg_statistic stores statistical data about the contents of the database. Entries are created by ANALYZE and subsequently used by the query planner. Note that all the statistical data is inherently approximate, even assuming that it is up-to-date. Normally there is one entry, with stainherit = false, for each table column that has been analyzed. If the table has inheritance children or partitions, a second entry with stainherit = true is also created. This row represents the column's statistics over the inheritance tree, i.e., statistics for the data you'd see with SELECT column FROM table*, whereas the stainherit = false row represents the results of SELECT column FROM ONLY table. pg_statistic also stores statistical data about the values of index expressions. These are described as if they were actual data columns; in particular, starelid references the index. No entry is made for an ordinary non-expression index column, however, since it would be redundant with the entry for the underlying table column. Currently, entries for index expressions always have stainherit = false. Since different kinds of statistics might be appropriate for different kinds of data, pg_statistic is designed not to assume very much about what sort of statistics it stores. Only extremely general statistics (such as nullness) are given dedicated columns in pg_statistic. Everything else is stored in “slots”, which are groups of associated columns whose content is identified by a code number in one of the slot's columns. For more information see src/include/catalog/pg_statistic.h. pg_statistic should not be readable by the public, since even statistical information about a table's contents might be considered sensitive. (Example: minimum and maximum values of a salary column might be quite interesting.) pg_stats is a publicly readable view on pg_statistic that only exposes information about those tables that are readable by the current user.
 starelid: The table or index that the described column belongs to
 staattnum: The number of the described column
-stainherit: If true, the stats include inheritance child columns, not just the values in the specified relation
+stainherit: If true, the stats include values from child tables, not just the values in the specified relation
 stanullfrac: The fraction of the column's entries that are null
 stawidth: The average stored width, in bytes, of nonnull entries
 stadistinct: The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which about 80% of the values are nonnull and each nonnull value appears about twice on average could be represented by stadistinct = -0.4. A zero value means the number of distinct values is unknown.
changedpg_statistic_ext_data
14 → 15
+ stxdinherit  boolean
rewordedpg_stats
--- 14
+++ 15
@@ -2,7 +2,7 @@
 schemaname: Name of schema containing table
 tablename: Name of table
 attname: Name of column described by this row
-inherited: If true, this row includes inheritance child columns, not just the values in the specified table
+inherited: If true, this row includes values from child tables, not just the values in the specified table
 null_frac: Fraction of column entries that are null
 avg_width: Average width in bytes of column's entries
 n_distinct: If greater than zero, the estimated number of distinct values in the column. If less than zero, the negative of the number of distinct values divided by the number of rows. (The negated form is used when ANALYZE believes that the number of distinct values is likely to increase as the table grows; the positive form is used when the column seems to have a fixed number of possible values.) For example, -1 indicates a unique column in which the number of distinct values is the same as the number of rows.
changedpg_stats_ext
14 → 15
+ inherited  boolean
changedpg_stats_ext_exprs
14 → 15
+ inherited  boolean
changedpg_subscription
14 → 15
+ subskiplsn  pg_lsn
+ subtwophasestate  "char"
+ subdisableonerr  boolean
rewordedpg_type
--- 14
+++ 15
@@ -6,7 +6,7 @@
 typlen: For a fixed-size type, typlen is the number of bytes in the internal representation of the type. But for a variable-length type, typlen is negative. -1 indicates a “varlena” type (one that has a length word), -2 indicates a null-terminated C string.
 typbyval: typbyval determines whether internal routines pass a value of this type by value or by reference. typbyval had better be false if typlen is not 1, 2, or 4 (or 8 on machines where Datum is 8 bytes). Variable-length types are always passed by reference. Note that typbyval can be false even if the length would allow pass-by-value.
 typtype: typtype is b for a base type, c for a composite type (e.g., a table's row type), d for a domain, e for an enum type, p for a pseudo-type, r for a range type, or m for a multirange type. See also typrelid and typbasetype.
-typcategory: typcategory is an arbitrary classification of data types that is used by the parser to determine which implicit casts should be “preferred”. See Table 52.63.
+typcategory: typcategory is an arbitrary classification of data types that is used by the parser to determine which implicit casts should be “preferred”. See Table 53.65.
 typispreferred: True if the type is a preferred cast target within its typcategory
 typisdefined: True if the type is defined, false if this is a placeholder entry for a not-yet-defined type. When typisdefined is false, nothing except the type name, namespace, and OID can be relied on.
 typdelim: Character that separates two values of this type when parsing array input. Note that the delimiter is associated with the array element data type, not the array data type.