System Catalogs / Version comparison
What changed?
System Catalogs · PostgreSQL 16 → 17
2 added · 0 removed · 11 changed · 39 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
--- 16 +++ 17 @@ -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 63 and Chapter 64 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 61 and Chapter 62 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
changedpg_attribute
16 → 17 ~ attstattarget NOT NULL → nullable ~ column order changed
rewordedpg_authid
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_authid contains information about database authorization identifiers (roles). A role subsumes the concepts of “users” and “groups”. A user is essentially just a role with the rolcanlogin flag set. Any role (with or without rolcanlogin) can have other roles as members; see pg_auth_members. Since this catalog contains passwords, it must not be publicly readable. pg_roles is a publicly readable view on pg_authid that blanks out the password field. Chapter 22 contains detailed information about user and privilege management. Because user identities are cluster-wide, pg_authid is shared across all databases of a cluster: there is only one copy of pg_authid per cluster, not one per database. +(relation) The catalog pg_authid contains information about database authorization identifiers (roles). A role subsumes the concepts of “users” and “groups”. A user is essentially just a role with the rolcanlogin flag set. Any role (with or without rolcanlogin) can have other roles as members; see pg_auth_members. Since this catalog contains passwords, it must not be publicly readable. pg_roles is a publicly readable view on pg_authid that blanks out the password field. Chapter 21 contains detailed information about user and privilege management. Because user identities are cluster-wide, pg_authid is shared across all databases of a cluster: there is only one copy of pg_authid per cluster, not one per database. oid: Row identifier rolname: Role name rolsuper: Role has superuser privileges @@ -7,7 +7,7 @@ rolcreatedb: Role can create databases rolcanlogin: Role can log in. That is, this role can be given as the initial session authorization identifier. rolreplication: Role is a replication role. A replication role can initiate replication connections and create and drop replication slots. -rolbypassrls: Role bypasses every row-level security policy, see Section 5.8 for more information. +rolbypassrls: Role bypasses every row-level security policy, see Section 5.9 for more information. rolconnlimit: For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit. rolpassword: Encrypted password; null if none. The format depends on the form of encryption used. rolvaliduntil: Password expiry time (only used for password authentication); null if no expiration
rewordedpg_class
--- 16 +++ 17 @@ -5,7 +5,7 @@ reltype: The OID of the data type that corresponds to this table's row type, if any; zero for indexes, sequences, and toast tables, which have no pg_type entry reloftype: For typed tables, the OID of the underlying composite type; zero for all other relations relowner: Owner of the relation -relam: If this is a table or an index, the access method used (heap, B-tree, hash, etc.); otherwise zero (zero occurs for sequences, as well as relations without storage, such as views) +relam: The access method used to access this table or index. Not meaningful if the relation is a sequence or has no on-disk file, except for partitioned tables, where, if set, it takes precedence over default_table_access_method when determining the access method to use for partitions created when one is not specified in the creation command. relfilenode: Name of the on-disk file of this relation; zero means this is a “mapped” relation whose disk file name is determined by low-level state reltablespace: The tablespace in which this relation is stored. If zero, the database's default tablespace is implied. Not meaningful if the relation has no on-disk file, except for partitioned tables, where this is the tablespace in which partitions will be created when one is not specified in the creation command. relpages: Size of the on-disk representation of this table in pages (of size BLCKSZ). This is only an estimate used by the planner. It is updated by VACUUM, ANALYZE, and a few DDL commands such as CREATE INDEX. @@ -29,6 +29,6 @@ relrewrite: For new relations being written during a DDL operation that requires a table rewrite, this contains the OID of the original relation; otherwise zero. That state is only visible internally; this field should never contain anything other than zero for a user-visible relation. relfrozenxid: All transaction IDs before this one have been replaced with a permanent (“frozen”) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction ID wraparound or to allow pg_xact to be shrunk. Zero (InvalidTransactionId) if the relation is not a table. relminmxid: All multixact IDs before this one have been replaced by a transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent multixact ID wraparound or to allow pg_multixact to be shrunk. Zero (InvalidMultiXactId) if the relation is not a table. -relacl: Access privileges; see Section 5.7 for details +relacl: Access privileges; see Section 5.8 for details reloptions: Access-method-specific options, as “keyword=value” strings relpartbound: If table is a partition (see relispartition), internal representation of the partition bound
changedpg_collation
16 → 17 + colllocale text - colliculocale text
rewordedpg_constraint
--- 16 +++ 17 @@ -1,8 +1,8 @@ -(relation) The catalog pg_constraint stores check, primary key, unique, foreign key, and exclusion constraints on tables. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) Not-null constraints are represented in the pg_attribute catalog, not here. User-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table. Check constraints on domains are stored here, too. +(relation) The catalog pg_constraint stores check, primary key, unique, foreign key, and exclusion constraints on tables, as well as not-null constraints on domains. (Column constraints are not treated specially. Every column constraint is equivalent to some table constraint.) Not-null constraints on relations are represented in the pg_attribute catalog, not here. User-defined constraint triggers (created with CREATE CONSTRAINT TRIGGER) also give rise to an entry in this table. Check constraints on domains are stored here, too. oid: Row identifier conname: Constraint name (not necessarily unique!) connamespace: The OID of the namespace that contains this constraint -contype: c = check constraint, f = foreign key constraint, p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint +contype: c = check constraint, f = foreign key constraint, n = not-null constraint (domains only), p = primary key constraint, u = unique constraint, t = constraint trigger, x = exclusion constraint condeferrable: Is the constraint deferrable? condeferred: Is the constraint deferred by default? convalidated: Has the constraint been validated? Currently, can be false only for foreign keys and CHECK constraints
rewordedpg_cursors
--- 16 +++ 17 @@ -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 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. +(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. 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
16 → 17 + dathasloginevt boolean + datlocale text - daticulocale text
rewordedpg_event_trigger
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_event_trigger stores event triggers. See Chapter 40 for more information. +(relation) The catalog pg_event_trigger stores event triggers. See Chapter 38 for more information. oid: Row identifier evtname: Trigger name (must be unique) evtevent: Identifies the event for which this trigger fires
rewordedpg_extension
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_extension stores information about the installed extensions. See Section 38.17 for details about extensions. +(relation) The catalog pg_extension stores information about the installed extensions. See Section 36.17 for details about extensions. oid: Row identifier extname: Name of the extension extowner: Owner of the extension
rewordedpg_foreign_data_wrapper
--- 16 +++ 17 @@ -4,5 +4,5 @@ fdwowner: Owner of the foreign-data wrapper fdwhandler: References a handler function that is responsible for supplying execution routines for the foreign-data wrapper. Zero if no handler is provided fdwvalidator: References a validator function that is responsible for checking the validity of the options given to the foreign-data wrapper, as well as options for foreign servers and user mappings using the foreign-data wrapper. Zero if no validator is provided -fdwacl: Access privileges; see Section 5.7 for details +fdwacl: Access privileges; see Section 5.8 for details fdwoptions: Foreign-data wrapper specific options, as “keyword=value” strings
rewordedpg_foreign_server
--- 16 +++ 17 @@ -5,5 +5,5 @@ srvfdw: OID of the foreign-data wrapper of this foreign server srvtype: Type of the server (optional) srvversion: Version of the server (optional) -srvacl: Access privileges; see Section 5.7 for details +srvacl: Access privileges; see Section 5.8 for details srvoptions: Foreign server specific options, as “keyword=value” strings
rewordedpg_init_privs
--- 16 +++ 17 @@ -3,4 +3,4 @@ classoid: The OID of the system catalog the object is in objsubid: For 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. privtype: A code defining the type of initial privilege of this object; see text -initprivs: The initial access privileges; see Section 5.7 for details +initprivs: The initial access privileges; see Section 5.8 for details
rewordedpg_language
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_language registers languages in which you can write functions or stored procedures. See CREATE LANGUAGE and Chapter 42 for more information about language handlers. +(relation) The catalog pg_language registers languages in which you can write functions or stored procedures. See CREATE LANGUAGE and Chapter 40 for more information about language handlers. oid: Row identifier lanname: Name of the language lanowner: Owner of the language @@ -7,4 +7,4 @@ lanplcallfoid: For noninternal languages this references the language handler, which is a special function that is responsible for executing all functions that are written in the particular language. Zero for internal languages. laninline: This references a function that is responsible for executing “inline” anonymous code blocks (DO blocks). Zero if inline blocks are not supported. lanvalidator: This references a language validator function that is responsible for checking the syntax and validity of new functions when they are created. Zero if no validator is provided. -lanacl: Access privileges; see Section 5.7 for details +lanacl: Access privileges; see Section 5.8 for details
rewordedpg_largeobject_metadata
--- 16 +++ 17 @@ -1,4 +1,4 @@ (relation) The catalog pg_largeobject_metadata holds metadata associated with large objects. The actual large object data is stored in pg_largeobject. oid: Row identifier lomowner: Owner of the large object -lomacl: Access privileges; see Section 5.7 for details +lomacl: Access privileges; see Section 5.8 for details
rewordedpg_locks
--- 16 +++ 17 @@ -1,11 +1,11 @@ (relation) The view pg_locks provides access to information about the locks held by active processes within the database server. See Chapter 13 for more discussion of locking. pg_locks contains one row per active lockable object, requested lock mode, and relevant process. Thus, the same lockable object might appear many times, if multiple processes are holding or waiting for locks on it. However, an object that currently has no locks on it will not appear at all. There are several distinct types of lockable objects: whole relations (e.g., tables), individual pages of relations, individual tuples of relations, transaction IDs (both virtual and permanent IDs), and general database objects (identified by class OID and object OID, in the same way as in pg_description or pg_depend). Also, the right to extend a relation is represented as a separate lockable object, as is the right to update pg_database.datfrozenxid. Also, “advisory” locks can be taken on numbers that have user-defined meanings. -locktype: Type of the lockable object: relation, extend, frozenid, page, tuple, transactionid, virtualxid, spectoken, object, userlock, advisory, or applytransaction. (See also Table 28.11.) +locktype: Type of the lockable object: relation, extend, frozenid, page, tuple, transactionid, virtualxid, spectoken, object, userlock, advisory, or applytransaction. (See also Table 27.11.) database: OID of the database in which the lock target exists, or zero if the target is a shared object, or null if the target is a transaction ID 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 74 -transactionid: ID of the transaction targeted by the lock, or null if the target is not a transaction ID; Chapter 74 +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 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_namespace
--- 16 +++ 17 @@ -2,4 +2,4 @@ oid: Row identifier nspname: Name of the namespace nspowner: Owner of the namespace -nspacl: Access privileges; see Section 5.7 for details +nspacl: Access privileges; see Section 5.8 for details
rewordedpg_opclass
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_opclass defines index access method operator classes. Each operator class defines semantics for index columns of a particular data type and a particular index access method. An operator class essentially specifies that a particular operator family is applicable to a particular indexable column data type. The set of operators from the family that are actually usable with the indexed column are whichever ones accept the column's data type as their left-hand input. Operator classes are described at length in Section 38.16. +(relation) The catalog pg_opclass defines index access method operator classes. Each operator class defines semantics for index columns of a particular data type and a particular index access method. An operator class essentially specifies that a particular operator family is applicable to a particular indexable column data type. The set of operators from the family that are actually usable with the indexed column are whichever ones accept the column's data type as their left-hand input. Operator classes are described at length in Section 36.16. oid: Row identifier opcmethod: Index access method operator class is for opcname: Name of this operator class
rewordedpg_operator
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_operator stores information about operators. See CREATE OPERATOR and Section 38.14 for more information. +(relation) The catalog pg_operator stores information about operators. See CREATE OPERATOR and Section 36.14 for more information. oid: Row identifier oprname: Name of the operator oprnamespace: The OID of the namespace that contains this operator
rewordedpg_opfamily
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_opfamily defines operator families. Each operator family is a collection of operators and associated support routines that implement the semantics specified for a particular index access method. Furthermore, the operators in a family are all “compatible”, in a way that is specified by the access method. The operator family concept allows cross-data-type operators to be used with indexes and to be reasoned about using knowledge of access method semantics. Operator families are described at length in Section 38.16. +(relation) The catalog pg_opfamily defines operator families. Each operator family is a collection of operators and associated support routines that implement the semantics specified for a particular index access method. Furthermore, the operators in a family are all “compatible”, in a way that is specified by the access method. The operator family concept allows cross-data-type operators to be used with indexes and to be reasoned about using knowledge of access method semantics. Operator families are described at length in Section 36.16. oid: Row identifier opfmethod: Index access method operator family is for opfname: Name of this operator family
rewordedpg_parameter_acl
--- 16 +++ 17 @@ -1,4 +1,4 @@ (relation) The catalog pg_parameter_acl records configuration parameters for which privileges have been granted to one or more roles. No entry is made for parameters that have default privileges. Unlike most system catalogs, pg_parameter_acl is shared across all databases of a cluster: there is only one copy of pg_parameter_acl per cluster, not one per database. oid: Row identifier parname: The name of a configuration parameter for which privileges are granted -paracl: Access privileges; see Section 5.7 for details +paracl: Access privileges; see Section 5.8 for details
rewordedpg_proc
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_proc stores information about functions, procedures, aggregate functions, and window functions (collectively also known as routines). See CREATE FUNCTION, CREATE PROCEDURE, and Section 38.3 for more information. If prokind indicates that the entry is for an aggregate function, there should be a matching row in pg_aggregate. +(relation) The catalog pg_proc stores information about functions, procedures, aggregate functions, and window functions (collectively also known as routines). See CREATE FUNCTION, CREATE PROCEDURE, and Section 36.3 for more information. If prokind indicates that the entry is for an aggregate function, there should be a matching row in pg_aggregate. oid: Row identifier proname: Name of the function pronamespace: The OID of the namespace that contains this function @@ -7,7 +7,7 @@ procost: Estimated execution cost (in units of cpu_operator_cost); if proretset, this is cost per row returned prorows: Estimated number of result rows (zero if not proretset) provariadic: Data type of the variadic array parameter's elements, or zero if the function does not have a variadic parameter -prosupport: Planner support function for this function (see Section 38.11), or zero if none +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. @@ -28,4 +28,4 @@ probin: Additional information about how to invoke the function. Again, the interpretation is language-specific. prosqlbody: Pre-parsed SQL function body. This is used for SQL-language functions when the body is given in SQL-standard notation rather than as a string literal. It's null in other cases. proconfig: Function's local settings for run-time configuration variables -proacl: Access privileges; see Section 5.7 for details +proacl: Access privileges; see Section 5.8 for details
rewordedpg_publication
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The catalog pg_publication contains all publications created in the database. For more on publications see Section 31.1. +(relation) The catalog pg_publication contains all publications created in the database. For more on publications see Section 29.1. oid: Row identifier pubname: Name of the publication pubowner: Owner of the publication
rewordedpg_publication_rel
--- 16 +++ 17 @@ -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 54.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 52.17 for a more user-friendly view of this information. oid: Row identifier prpubid: Reference to publication prrelid: Reference to relation
rewordedpg_replication_origin
--- 16 +++ 17 @@ -1,3 +1,3 @@ -(relation) The pg_replication_origin catalog contains all replication origins created. For more on replication origins see Chapter 50. Unlike most system catalogs, pg_replication_origin is shared across all databases of a cluster: there is only one copy of pg_replication_origin per cluster, not one per database. +(relation) The pg_replication_origin catalog contains all replication origins created. For more on replication origins see Chapter 48. Unlike most system catalogs, pg_replication_origin is shared across all databases of a cluster: there is only one copy of pg_replication_origin per cluster, not one per database. roident: A unique, cluster-wide identifier for the replication origin. Should never leave the system. roname: The external, user defined, name of a replication origin.
rewordedpg_replication_origin_status
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) The pg_replication_origin_status view contains information about how far replay for a certain origin has progressed. For more on replication origins see Chapter 50. +(relation) The pg_replication_origin_status view contains information about how far replay for a certain origin has progressed. For more on replication origins see Chapter 48. local_id: internal node identifier external_id: external node identifier remote_lsn: The origin node's LSN up to which data has been replicated.
changedpg_replication_slots
16 → 17 + inactive_since timestamp with time zone + invalidation_reason text + failover boolean + synced boolean
rewordedpg_roles
--- 16 +++ 17 @@ -9,6 +9,6 @@ rolconnlimit: For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit. rolpassword: Not the password (always reads as ********) rolvaliduntil: Password expiry time (only used for password authentication); null if no expiration -rolbypassrls: Role bypasses every row-level security policy, see Section 5.8 for more information. +rolbypassrls: Role bypasses every row-level security policy, see Section 5.9 for more information. rolconfig: Role-specific defaults for run-time configuration variables oid: ID of role
rewordedpg_seclabel
--- 16 +++ 17 @@ -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 54.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 52.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_shadow
--- 16 +++ 17 @@ -4,7 +4,7 @@ usecreatedb: User can create databases usesuper: User is a superuser userepl: User can initiate streaming replication and put the system in and out of backup mode. -usebypassrls: User bypasses every row-level security policy, see Section 5.8 for more information. +usebypassrls: User bypasses every row-level security policy, see Section 5.9 for more information. passwd: Encrypted password; null if none. See pg_authid for details of how encrypted passwords are stored. valuntil: Password expiry time (only used for password authentication) useconfig: Session defaults for run-time configuration variables
rewordedpg_shmem_allocations
--- 16 +++ 17 @@ -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 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 36.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 in bytes
rewordedpg_shseclabel
--- 16 +++ 17 @@ -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 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. +(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. 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
--- 16 +++ 17 @@ -13,11 +13,11 @@ xact_start: Time when this process' current transaction was started, or null if no transaction is active. If the current query is the first of its transaction, this column is equal to the query_start column. query_start: Time when the currently active query was started, or if state is not active, when the last query was started 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 28.4. -wait_event: Wait event name if backend is currently waiting, otherwise NULL. See Table 28.5 through Table 28.13. +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 74.1. +backend_xid: Top-level transaction identifier of this backend, if any; see Section 66.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. -backend_type: Type of current backend. Possible types are autovacuum launcher, autovacuum worker, logical replication launcher, logical replication worker, parallel worker, background writer, client backend, checkpointer, archiver, standalone backend, startup, walreceiver, walsender and walwriter. In addition, background workers registered by extensions may have additional types. +backend_type: Type of current backend. Possible types are autovacuum launcher, autovacuum worker, logical replication launcher, logical replication worker, parallel worker, background writer, client backend, checkpointer, archiver, standalone backend, startup, walreceiver, walsender, walwriter and walsummarizer. In addition, background workers registered by extensions may have additional types.
changedpg_stat_bgwriter
16 → 17 - checkpoints_timed bigint - checkpoints_req bigint - checkpoint_write_time double precision - checkpoint_sync_time double precision - buffers_checkpoint bigint - buffers_backend bigint - buffers_backend_fsync bigint
addedpg_stat_checkpointer
--- 16 +++ 17 @@ -0,0 +1,9 @@ +num_timed bigint +num_requested bigint +restartpoints_timed bigint +restartpoints_req bigint +restartpoints_done bigint +write_time double precision +sync_time double precision +buffers_written bigint +stats_reset timestamp with time zone
rewordedpg_stat_io
--- 16 +++ 17 @@ -1,7 +1,7 @@ (relation) The pg_stat_io view will contain one row for each combination of backend type, target I/O object, and I/O context, showing cluster-wide I/O statistics. Combinations which do not make sense are omitted. Currently, I/O on relations (e.g. tables, indexes) is tracked. However, relation I/O which bypasses shared buffers (e.g. when moving a table from one tablespace to another) is currently not tracked. backend_type: Type of backend (e.g. background worker, autovacuum worker). See pg_stat_activity for more information on backend_types. Some backend_types do not accumulate I/O operation statistics and will not be included in the view. object: Target object of an I/O operation. Possible values are: relation: Permanent relations. temp relation: Temporary relations. -context: The context of an I/O operation. Possible values are: normal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table IO operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY. +context: The context of an I/O operation. Possible values are: normal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation data to and from shared buffers are tracked in context normal. vacuum: I/O operations performed outside of shared buffers while vacuuming and analyzing permanent relations. Temporary table vacuums use the same local buffer pool as other temporary table I/O operations and are tracked in context normal. bulkread: Certain large read I/O operations done outside of shared buffers, for example, a sequential scan of a large table. bulkwrite: Certain large write I/O operations done outside of shared buffers, such as COPY. reads: Number of read operations, each of the size specified in op_bytes. read_time: Time spent in read operations in milliseconds (if track_io_timing is enabled, otherwise zero) writes: Number of write operations, each of the size specified in op_bytes.
rewordedpg_stat_progress_analyze
--- 16 +++ 17 @@ -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.38. +phase: Current processing phase. See Table 27.39. 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
--- 16 +++ 17 @@ -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.47. +phase: Current processing phase. See Table 27.48. 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
--- 16 +++ 17 @@ -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.40. +phase: Current processing phase. See Table 27.41. 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.
changedpg_stat_progress_copy
16 → 17 + tuples_skipped bigint
rewordedpg_stat_progress_create_index
--- 16 +++ 17 @@ -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: Specific command type: CREATE INDEX, CREATE INDEX CONCURRENTLY, REINDEX, or REINDEX CONCURRENTLY. -phase: Current processing phase of index creation. See Table 28.43. +phase: Current processing phase of index creation. See Table 27.44. 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.
changedpg_stat_progress_vacuum
16 → 17 + max_dead_tuple_bytes bigint + dead_tuple_bytes bigint + num_dead_item_ids bigint + indexes_total bigint + indexes_processed bigint - max_dead_tuples bigint - num_dead_tuples bigint
rewordedpg_stat_slru
--- 16 +++ 17 @@ -1,4 +1,4 @@ -(relation) PostgreSQL accesses certain on-disk information via SLRU (simple least-recently-used) caches. The pg_stat_slru view will contain one row for each tracked SLRU cache, showing statistics about access to cached pages. +(relation) PostgreSQL accesses certain on-disk information via SLRU (simple least-recently-used) caches. The pg_stat_slru view will contain one row for each tracked SLRU cache, showing statistics about access to cached pages. For each SLRU cache that's part of the core server, there is a configuration parameter that controls its size, with the suffix _buffers appended. name: Name of the SLRU blks_zeroed: Number of blocks zeroed during initializations blks_hit: Number of times disk blocks were found already in the SLRU, so that a read was not necessary (this only includes hits in the SLRU, not the operating system's file system cache)
changedpg_stat_subscription
16 → 17 + worker_type text
rewordedpg_stat_wal
--- 16 +++ 17 @@ -3,8 +3,8 @@ wal_fpi: Total number of WAL full page images generated wal_bytes: Total amount of WAL generated in bytes wal_buffers_full: Number of times WAL data was written to disk because WAL buffers became full -wal_write: Number of times WAL buffers were written out to disk via XLogWrite request. See Section 30.5 for more information about the internal WAL function XLogWrite. -wal_sync: Number of times WAL files were synced to disk via issue_xlog_fsync request (if fsync is on and wal_sync_method is either fdatasync, fsync or fsync_writethrough, otherwise zero). See Section 30.5 for more information about the internal WAL function issue_xlog_fsync. +wal_write: Number of times WAL buffers were written out to disk via XLogWrite request. See Section 28.5 for more information about the internal WAL function XLogWrite. +wal_sync: Number of times WAL files were synced to disk via issue_xlog_fsync request (if fsync is on and wal_sync_method is either fdatasync, fsync or fsync_writethrough, otherwise zero). See Section 28.5 for more information about the internal WAL function issue_xlog_fsync. wal_write_time: Total amount of time spent writing WAL buffers to disk via XLogWrite request, in milliseconds (if track_wal_io_timing is enabled, otherwise zero). This includes the sync time when wal_sync_method is either open_datasync or open_sync. wal_sync_time: Total amount of time spent syncing WAL files to disk via issue_xlog_fsync request, in milliseconds (if track_wal_io_timing is enabled, fsync is on, and wal_sync_method is either fdatasync, fsync or fsync_writethrough, otherwise zero). stats_reset: Time at which these statistics were last reset
changedpg_statistic_ext
16 → 17 ~ stxstattarget integer → smallint ~ stxstattarget NOT NULL → nullable ~ column order changed
changedpg_stats
16 → 17 + range_length_histogram anyarray + range_empty_frac real + range_bounds_histogram anyarray
changedpg_subscription
16 → 17 + subfailover boolean
rewordedpg_tablespace
--- 16 +++ 17 @@ -2,5 +2,5 @@ oid: Row identifier spcname: Tablespace name spcowner: Owner of the tablespace, usually the user who created it -spcacl: Access privileges; see Section 5.7 for details +spcacl: Access privileges; see Section 5.8 for details spcoptions: Tablespace-level options, as “keyword=value” strings
rewordedpg_type
--- 16 +++ 17 @@ -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 53.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 51.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. @@ -30,4 +30,4 @@ typcollation: typcollation specifies the collation of the type. If the type does not support collations, this will be zero. A base type that supports collations will have a nonzero value here, typically DEFAULT_COLLATION_OID. A domain over a collatable type can have a collation OID different from its base type's, if one was specified for the domain. typdefaultbin: If typdefaultbin is not null, it is the nodeToString() representation of a default expression for the type. This is only used for domains. typdefault: typdefault is null if the type has no associated default value. If typdefaultbin is not null, typdefault must contain a human-readable version of the default expression represented by typdefaultbin. If typdefaultbin is null and typdefault is not, then typdefault is the external representation of the type's default value, which can be fed to the type's input converter to produce a constant. -typacl: Access privileges; see Section 5.7 for details +typacl: Access privileges; see Section 5.8 for details
rewordedpg_user
--- 16 +++ 17 @@ -4,7 +4,7 @@ usecreatedb: User can create databases usesuper: User is a superuser userepl: User can initiate streaming replication and put the system in and out of backup mode. -usebypassrls: User bypasses every row-level security policy, see Section 5.8 for more information. +usebypassrls: User bypasses every row-level security policy, see Section 5.9 for more information. passwd: Not the password (always reads as ********) valuntil: Password expiry time (only used for password authentication) useconfig: Session defaults for run-time configuration variables
addedpg_wait_events
--- 16 +++ 17 @@ -0,0 +1,3 @@ +type text +name text +description text