↑↓ 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 17 → 18

Browse PG 18

2 added · 0 removed · 16 changed · 14 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.

addedpg_aios
--- 17
+++ 18
@@ -0,0 +1,15 @@
+pid  integer
+io_id  integer
+io_generation  bigint
+state  text
+operation  text
+off  bigint
+length  bigint
+target  text
+handle_data_len  smallint
+raw_result  integer
+result  text
+target_desc  text
+f_sync  boolean
+f_localmem  boolean
+f_buffered  boolean
rewordedpg_am
--- 17
+++ 18
@@ -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 62 and Chapter 63 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_attrdef
--- 17
+++ 18
@@ -1,5 +1,5 @@
-(relation) The catalog pg_attrdef stores column default values. The main information about columns is stored in pg_attribute. Only columns for which a default value has been explicitly set will have an entry here.
+(relation) The catalog pg_attrdef stores column default expressions and generation expressions. The main information about columns is stored in pg_attribute. Only columns for which a default expression or generation expression has been explicitly set will have an entry here.
 oid: Row identifier
 adrelid: The table this column belongs to
 adnum: The number of the column
-adbin: The column default value, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.
+adbin: The column default or generation expression, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.
changedpg_attribute
17 → 18
- attcacheoff  integer
changedpg_backend_memory_contexts
17 → 18
+ type  text
+ path  integer[]
- parent  text
changedpg_class
17 → 18
+ relallfrozen  integer
changedpg_constraint
17 → 18
+ conenforced  boolean
+ conperiod  boolean
rewordedpg_cursors
--- 17
+++ 18
@@ -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 45.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 54.2.3 via the Server Programming Interface (SPI), as described in Section 45.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
rewordedpg_default_acl
--- 17
+++ 18
@@ -2,5 +2,5 @@
 oid: Row identifier
 defaclrole: The OID of the role associated with this entry
 defaclnamespace: The OID of the namespace associated with this entry, or zero if none
-defaclobjtype: Type of object this entry is for: r = relation (table, view), S = sequence, f = function, T = type, n = schema
+defaclobjtype: Type of object this entry is for: r = relation (table, view), S = sequence, f = function, T = type, n = schema, L = large object
 defaclacl: Access privileges that this type of object should have on creation
rewordedpg_locks
--- 17
+++ 18
@@ -4,8 +4,8 @@
 relation: OID of the relation targeted by the lock, or null if the target is not a relation or part of a relation
 page: Page number targeted by the lock within the relation, or null if the target is not a relation page or tuple
 tuple: Tuple number targeted by the lock within the page, or null if the target is not a tuple
-virtualxid: Virtual ID of the transaction targeted by the lock, or null if the target is not a virtual transaction ID; see Chapter 66
-transactionid: ID of the transaction targeted by the lock, or null if the target is not a transaction ID; Chapter 66
+virtualxid: Virtual ID of the transaction targeted by the lock, or null if the target is not a virtual transaction ID; see Chapter 67
+transactionid: ID of the transaction targeted by the lock, or null if the target is not a transaction ID; Chapter 67
 classid: OID of the system catalog containing the lock target, or null if the target is not a general database object
 objid: OID of the lock target within its system catalog, or null if the target is not a general database object
 objsubid: Column number targeted by the lock (the classid and objid refer to the table itself), or zero if the target is some other general database object, or null if the target is not a general database object
rewordedpg_proc
--- 17
+++ 18
@@ -10,7 +10,7 @@
 prosupport: Planner support function for this function (see Section 36.11), or zero if none
 prokind: f for a normal function, p for a procedure, a for an aggregate function, or w for a window function
 prosecdef: Function is a security definer (i.e., a “setuid” function)
-proleakproof: The function has no side effects. No information about the arguments is conveyed except via the return value. Any function that might throw an error depending on the values of its arguments is not leak-proof.
+proleakproof: The function has no side effects. No information about the arguments is conveyed except via the return value. Any function that might throw an error depending on the values of its arguments is not leakproof.
 proisstrict: Function returns null if any call argument is null. In that case the function won't actually be called at all. Functions that are not “strict” must be prepared to handle null inputs.
 proretset: Function returns a set (i.e., multiple values of the specified data type)
 provolatile: provolatile tells whether the function's result depends only on its input arguments, or is affected by outside factors. It is i for “immutable” functions, which always deliver the same result for the same inputs. It is s for “stable” functions, whose results (for fixed inputs) do not change within a scan. It is v for “volatile” functions, whose results might change at any time. (Use v also for functions with side-effects, so that calls to them cannot get optimized away.)
changedpg_publication
17 → 18
+ pubgencols  "char"
rewordedpg_publication_rel
--- 17
+++ 18
@@ -1,4 +1,4 @@
-(relation) The catalog pg_publication_rel contains the mapping between relations and publications in the database. This is a many-to-many mapping. See also Section 52.17 for a more user-friendly view of this information.
+(relation) The catalog pg_publication_rel contains the mapping between relations and publications in the database. This is a many-to-many mapping. See also Section 53.18 for a more user-friendly view of this information.
 oid: Row identifier
 prpubid: Reference to publication
 prrelid: Reference to relation
changedpg_replication_slots
17 → 18
+ two_phase_at  pg_lsn
rewordedpg_seclabel
--- 17
+++ 18
@@ -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.22. 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 53.23. 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_shmem_allocations
--- 17
+++ 18
@@ -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 PostgreSQL itself and memory allocated by extensions using the mechanisms detailed in Section 36.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 36.10.11. 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 in bytes
addedpg_shmem_allocations_numa
--- 17
+++ 18
@@ -0,0 +1,3 @@
+name  text
+numa_node  integer
+size  bigint
rewordedpg_shseclabel
--- 17
+++ 18
@@ -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.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.
+(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 53.23. 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_activity
--- 17
+++ 18
@@ -15,8 +15,8 @@
 state_change: Time when the state was last changed
 wait_event_type: The type of event for which the backend is waiting, if any; otherwise NULL. See Table 27.4.
 wait_event: Wait event name if backend is currently waiting, otherwise NULL. See Table 27.5 through Table 27.13.
-state: Current overall state of this backend. Possible values are: active: The backend is executing a query. idle: The backend is waiting for a new client command. idle in transaction: The backend is in a transaction, but is not currently executing a query. idle in transaction (aborted): This state is similar to idle in transaction, except one of the statements in the transaction caused an error. fastpath function call: The backend is executing a fast-path function. disabled: This state is reported if track_activities is disabled in this backend.
-backend_xid: Top-level transaction identifier of this backend, if any; see Section 66.1.
+state: Current overall state of this backend. Possible values are: starting: The backend is in initial startup. Client authentication is performed during this phase. active: The backend is executing a query. idle: The backend is waiting for a new client command. idle in transaction: The backend is in a transaction, but is not currently executing a query. idle in transaction (aborted): This state is similar to idle in transaction, except one of the statements in the transaction caused an error. fastpath function call: The backend is executing a fast-path function. disabled: This state is reported if track_activities is disabled in this backend.
+backend_xid: Top-level transaction identifier of this backend, if any; see Section 67.1.
 backend_xmin: The current backend's xmin horizon.
 query_id: Identifier of this backend's most recent query. If state is active this field shows the identifier of the currently executing query. In all other states, it shows the identifier of last query that was executed. Query identifiers are not computed by default so this field will be null unless compute_query_id parameter is enabled or a third-party module that computes query identifiers is configured.
 query: Text of this backend's most recent query. If state is active this field shows the currently executing query. In all other states, it shows the last query that was executed. By default the query text is truncated at 1024 bytes; this value can be changed via the parameter track_activity_query_size.
changedpg_stat_all_tables
17 → 18
+ total_vacuum_time  double precision
+ total_autovacuum_time  double precision
+ total_analyze_time  double precision
+ total_autoanalyze_time  double precision
changedpg_stat_checkpointer
17 → 18
+ num_done  bigint
+ slru_written  bigint
changedpg_stat_database
17 → 18
+ parallel_workers_to_launch  bigint
+ parallel_workers_launched  bigint
changedpg_stat_io
17 → 18
+ read_bytes  numeric
+ write_bytes  numeric
+ extend_bytes  numeric
- op_bytes  bigint
changedpg_stat_progress_analyze
17 → 18
+ delay_time  double precision
changedpg_stat_progress_vacuum
17 → 18
+ delay_time  double precision
changedpg_stat_subscription_stats
17 → 18
+ confl_insert_exists  bigint
+ confl_update_origin_differs  bigint
+ confl_update_exists  bigint
+ confl_update_missing  bigint
+ confl_delete_origin_differs  bigint
+ confl_delete_missing  bigint
+ confl_multiple_unique_conflicts  bigint
changedpg_stat_sys_tables
17 → 18
+ total_vacuum_time  double precision
+ total_autovacuum_time  double precision
+ total_analyze_time  double precision
+ total_autoanalyze_time  double precision
changedpg_stat_user_tables
17 → 18
+ total_vacuum_time  double precision
+ total_autovacuum_time  double precision
+ total_analyze_time  double precision
+ total_autoanalyze_time  double precision
changedpg_stat_wal
17 → 18
- wal_write  bigint
- wal_sync  bigint
- wal_write_time  double precision
- wal_sync_time  double precision
rewordedpg_subscription
--- 17
+++ 18
@@ -11,7 +11,7 @@
 subdisableonerr: If true, the subscription will be disabled if one of its workers detects an error
 subpasswordrequired: If true, the subscription will be required to specify a password for authentication
 subrunasowner: If true, the subscription will be run with the permissions of the subscription owner
-subfailover: If true, the associated replication slots (i.e. the main slot and the table sync slots) in the upstream database are enabled to be synchronized to the standbys
+subfailover: If true, the associated replication slots (i.e. the main slot and the table synchronization slots) in the upstream database are enabled to be synchronized to the standbys
 subconninfo: Connection string to the upstream database
 subslotname: Name of the replication slot in the upstream database (also used for the local replication origin name); null represents NONE
 subsynccommit: The synchronous_commit setting for the subscription's workers to use
rewordedpg_timezone_abbrevs
--- 17
+++ 18
@@ -1,4 +1,4 @@
-(relation) The view pg_timezone_abbrevs provides a list of time zone abbreviations that are currently recognized by the datetime input routines. The contents of this view change when the timezone_abbreviations run-time parameter is modified.
+(relation) The view pg_timezone_abbrevs provides a list of time zone abbreviations that are currently recognized by the datetime input routines. The contents of this view change when the TimeZone or timezone_abbreviations run-time parameters are modified.
 abbrev: Time zone abbreviation
 utc_offset: Offset from UTC (positive means east of Greenwich)
 is_dst: True if this is a daylight-savings abbreviation
rewordedpg_type
--- 17
+++ 18
@@ -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 51.65.
+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.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.