M. Glossary
Last updated
Was this helpful?
Last updated
Was this helpful?
This is a list of terms and their meaning in the context of PostgreSQL and relational database systems in general.
, , , and . This set of properties of database transactions is intended to guarantee validity in concurrent operation and even in event of errors, power failures, etc.
A that combines (aggregates) multiple input values, for example by counting, averaging or adding, yielding a single output value.
For more information, see .
See Also .
See .
The process of collecting statistics from data in and other to help the to make decisions about how to execute .
(Don't confuse this term with the ANALYZE
option to the command.)
For more information, see .
In reference to a : the fact that its value cannot be broken down into smaller components.
In reference to a : see .
Space in data pages which does not contain current row versions, such as unused (free) space or outdated row versions.Cast
A checkpoint is also the act of carrying out all the actions that are necessary to reach a checkpoint as defined above. This process is initiated when predefined conditions are met, such as a specified amount of time has passed, or a certain volume of records has been written; or it can be invoked by the user with the command CHECKPOINT
.
A specialized process responsible for executing checkpoints.
A collection of databases and global SQL objects, and their common static and dynamic metadata. Sometimes referred to as a cluster.
In PostgreSQL, the term cluster is also sometimes used to refer to an instance. (Don't confuse this term with the SQL command CLUSTER
.)Database server
The internal representation of one value of an SQL data type.Delete
A storage structure that keeps metadata about each data page of a table's main fork. The free space map entry for each page stores the amount of free space that's available for future tuples, and is structured to be efficiently searched for available space for a new tuple of a given size.
A mechanism that allows a process to limit or prevent simultaneous access to a resource.Log file
Log files contain human-readable text lines about events. Examples include login failures, long-running queries, etc.
The property that some information has been pre-computed and stored for later use, rather than computing it on-the-fly.
This term is also used to refer to some multi-step queries to mean that the data resulting from executing a given step is stored in memory (with the possibility of spilling to disk), so that it can be read multiple times by another step.Materialized view (relation)
A concept of non-existence that is a central tenet of relational database theory. It represents the absence of a definite value.Optimizer
One of several disjoint (not overlapping) subsets of a larger set.
A type of routine. Their distinctive qualities are that they do not return values, and that they are allowed to make transactional statements such as COMMIT
and ROLLBACK
. They are invoked via the CALL
command.
More generically, a relation is a set of tuples; for example, the result of a query is also a relation.
In PostgreSQL, Class is an archaic synonym for relation.Replica (server)
The fact that a result set is a relation means that a query can be used in the definition of another query, becoming a subquery.Revoke
Many routines are already defined within PostgreSQL itself, but user-defined ones can also be added.Row
All system-defined SQL objects reside in schema pg_catalog
.
This term is sometimes used to refer to an instance or to a host.Session
The largest part of shared memory is known as shared buffers and is used to mirror part of data files, organized into pages. When a page is modified, it is called a dirty page until it is written back to the file system.
Any object that can be created with a CREATE
command. Most objects are specific to one database, and are commonly known as local objects.
A series of documents that define the SQL language.Standby (server)
A mechanism by which large attributes of table rows are split and stored in a secondary table, called the TOAST table. Each relation with large attributes has its own TOAST table.
The numerical, unique, sequentially-assigned identifier that each transaction receives when it first causes a database modification. Frequently abbreviated as xid. When stored on disk, xids are only 32-bits wide, so only approximately four billion write transaction IDs can be generated; to permit the system to run for longer than that, epochs are used, also 32 bits wide. When the counter reaches the maximum xid value, it starts over at 3
(values under that are reserved) and the epoch value is incremented by one. In some contexts, the epoch and xid values are considered together as a single 64-bit value.
Average number of transactions that are executed per second, totaled across all sessions active for a measured run. This is used as a measure of the performance characteristics of an instance.Trigger
The primary use of unlogged tables is for storing transient work data that must be shared across processes.
A storage structure that keeps metadata about each data page of a table's main fork. The visibility map entry for each page stores two bits: the first one (all-visible
) indicates that all tuples in the page are visible to all transactions. The second one (all-frozen
) indicates that all tuples in the page are marked frozen.WAL
A low-level description of an individual data change. It contains sufficient information for the data change to be re-executed (replayed) in case a system failure causes the change to be lost. WAL records use a non-printable binary format.
The property of a that either all its operations complete as a single unit or none do. In addition, if a system failure occurs during the execution of a transaction, no partial results are visible after recovery. This is one of the ACID properties.
An element with a certain name and data type found within a .
A set of background processes that routinely perform and operations.
For more information, see .
Process of an which acts on behalf of a and handles its requests.
(Don't confuse this term with the similar terms or ).
Process within an , which runs system- or user-supplied code. Serves as infrastructure for several features in PostgreSQL, such as and . In addition, can add custom background worker processes.
For more information, see .
A process that writes dirty from to the file system. It wakes up periodically, but works only for a short period in order to distribute its expensive I/O activity over time to avoid generating larger I/O peaks which could block other processes.
For more information, see .
A conversion of a from its current data type to another data type.
For more information, see .
The SQL standard uses this term to indicate what is called a in PostgreSQL's terminology.
(Don't confuse this term with ).
For more information, see .
A type of defined on a which restricts the values allowed in one or more . The check constraint can make reference to any attribute of the same row in the relation, but cannot reference other rows of the same relation or other relations.
For more information, see .
A point in the sequence at which it is guaranteed that the heap and index data files have been updated with all information from modified before that checkpoint; a checkpoint record is written and flushed to WAL to mark that point.
For more information, see .
See .Client (process)
Any process, possibly remote, that establishes a by to an to interact with a .
An found in a or .Commit
The act of finalizing a within the , which makes it visible to other transactions and assures its .
For more information, see .
The concept that multiple independent operations happen within the at the same time. In PostgreSQL, concurrency is controlled by the mechanism.
An established line of communication between a client process and a process, usually over a network, supporting a . This term is sometimes used as a synonym for session.
For more information, see .
The property that the data in the is always in compliance with . Transactions may be allowed to violate some of the constraints transiently before it commits, but if such violations are not resolved by the time it commits, such a transaction is automatically . This is one of the ACID properties.
A restriction on the values of data allowed within a , or in attributes of a domain.
For more information, see .
See .Database
A named collection of .
For more information, see .Database cluster
See .Data directory
The base directory on the file system of a that contains all data files and subdirectories associated with a (with the exception of , and optionally ). The environment variable PGDATA
is commonly used to refer to the data directory.
A 's storage space comprises the data directory plus any additional tablespaces.
For more information, see .Data page
The basic structure used to store relation data. All pages are of the same size. Data pages are typically stored on disk, each in a specific file, and can be read to where they can be modified, becoming dirty. They become clean when written to disk. New pages, which initially exist in memory only, are also dirty until written.Datum
An SQL command which removes from a given or .
For more information, see .Durability
The assurance that once a has been , the changes remain even after a system failure or crash. This is one of the ACID properties.Epoch
See .Extension
A software add-on package that can be installed on an to get extra features.
For more information, see .File segment
A physical file which stores data for a given . File segments are limited in size by a configuration value (typically 1 gigabyte), so if a relation exceeds that size, it is split into multiple segments.
For more information, see .
(Don't confuse this term with the similar term ).Foreign data wrapper
A means of representing data that is not contained in the local so that it appears as if were in local . With a foreign data wrapper it is possible to define a and .
For more information, see .Foreign key
A type of defined on one or more in a which requires the value(s) in those to identify zero or one in another (or, infrequently, the same) .Foreign server
A named collection of which all use the same and have other configuration values in common.
For more information, see .Foreign table (relation)
A which appears to have and similar to a regular , but will forward requests for data through its , which will return structured according to the definition of the .
For more information, see .Fork
Each of the separate segmented file sets in which a relation is stored. The main fork is where the actual data resides. There also exist two secondary forks for metadata: the and the . also have an init fork.Free space map (fork)
For more information, see .Function (routine)
A type of routine that receives zero or more arguments, returns zero or more output values, and is constrained to run within one transaction. Functions are invoked as part of a query, for example via SELECT
. Certain functions can return ; those are called set-returning functions.
Functions can also be used for to invoke.
For more information, see .Grant
An SQL command that is used to allow a or to access specific objects within the .
For more information, see .Heap
Contains the values of attributes (i.e., the data) for a . The heap is realized within one or more in the relation's .Host
A computer that communicates with other computers over a network. This is sometimes used as a synonym for . It is also used to refer to a computer where run.Index (relation)
A that contains data derived from a or . Its internal structure supports fast retrieval of and access to the original data.
For more information, see .Insert
An SQL command used to add new data into a .
For more information, see .Instance
A group of backend and auxiliary processes that communicate using a common shared memory area. One manages the instance; one instance manages exactly one with all its databases. Many instances can run on the same as long as their TCP ports do not conflict.
The instance handles all key features of a DBMS: read and write access to files and shared memory, assurance of the ACID properties, to , privilege verification, crash recovery, replication, etc.Isolation
The property that the effects of a transaction are not visible to before it commits. This is one of the ACID properties.
For more information, see .Join
An operation and SQL keyword used in for combining data from multiple .Key
A means of identifying a within a or other by values contained within one or more in that relation.Lock
For more information, see .Logged
A is considered if changes to it are sent to the . By default, all regular tables are logged. A table can be specified as either at creation time or via the ALTER TABLE
command.Logger (process)
If activated, the process writes information about database events into the current . When reaching certain time- or volume-dependent criteria, a new log file is created. Also called syslogger.
For more information, see .Log record
Archaic term for a .Master (server)
See .Materialized
This term is used in , to mean that the data derived from the view's query is stored on disk separately from the sources of that data.
A that is defined by a SELECT
statement (just like a ), but stores data in the same way that a does. It cannot be modified via INSERT
, UPDATE
, or DELETE
operations.
For more information, see .Multi-version concurrency control (MVCC)
A mechanism designed to allow several to be reading and writing the same rows without one process causing other processes to stall. In PostgreSQL, MVCC is implemented by creating copies (versions) of as they are modified; after transactions that can see the old versions terminate, those old versions need to be removed.Null
See .Parallel query
The ability to handle parts of executing a to take advantage of parallel processes on servers with multiple CPUs.Partition
In reference to a : One of the tables that each contain part of the data of the partitioned table, which is said to be the parent. The partition is itself a table, so it can also be queried directly; at the same time, a partition can sometimes be a partitioned table, allowing hierarchies to be created.
In reference to a in a , a partition is a user-defined criterion that identifies which neighboring of the can be considered by the function.Partitioned table (relation)
A that is in semantic terms the same as a , but whose storage is distributed across several .Postmaster (process)
The very first process of an . It starts and manages the other auxiliary processes and creates on demand.
For more information, see .Primary key
A special case of a defined on a or other that also guarantees that all of the within the do not have values. As the name implies, there can be only one primary key per table, though it is possible to have multiple unique constraints that also have no null-capable attributes.Primary (server)
When two or more are linked via , the that is considered the authoritative source of information is called the primary, also known as a master.Procedure (routine)
For more information, see .Query
A request sent by a client to a , usually to return results or to modify data on the database.Query planner
The part of PostgreSQL that is devoted to determining (planning) the most efficient way to execute . Also known as query optimizer, optimizer, or simply planner.Record
See .Recycling
See .Referential integrity
A means of restricting data in one by a so that it must have matching data in another .Relation
The generic term for all objects in a that have a name and a list of defined in a specific order. , , , , , composite types, and are all relations.
A that is paired with a database and is maintaining a copy of some or all of the primary database's data. The foremost reasons for doing this are to allow for greater access to that data, and to maintain availability of the data in the event that the becomes unavailable.Replication
The act of reproducing data on one onto another server called a . This can take the form of physical replication, where all file changes from one server are copied verbatim, or logical replication where a defined subset of data changes are conveyed using a higher-level representation.Result set
A transmitted from a to a upon the completion of an SQL command, usually a SELECT
but it can be an INSERT
, UPDATE
, or DELETE
command if the RETURNING
clause is specified.
A command to prevent access to a named set of objects for a named list of .
For more information, see .Role
A collection of access privileges to the . Roles are themselves a privilege that can be granted to other roles. This is often done for convenience or to ensure completeness when multiple need the same privileges.
For more information, see .Rollback
A command to undo all of the operations performed since the beginning of a .
For more information, see .Routine
A defined set of instructions stored in the database system that can be invoked for execution. A routine can be written in a variety of programming languages. Routines can be (including set-returning functions and ), , and .
See .Savepoint
A special mark in the sequence of steps in a . Data modifications after this point in time may be reverted to the time of the savepoint.
For more information, see .Schema
A schema is a namespace for , which all reside in the same . Each SQL object must reside in exactly one schema.
More generically, the term schema is used to mean all data descriptions ( definitions, , comments, etc) for a given or subset thereof.
For more information, see .Segment
See .Select
The SQL command used to request data from a . Normally, SELECT
commands are not expected to modify the in any way, but it is possible that invoked within the query could have side effects that do modify data.
For more information, see .Sequence (relation)
A type of relation that is used to generate values. Typically the generated values are sequential non-repeating numbers. They are commonly used to generate surrogate values.Server
A computer on which PostgreSQL run. The term server denotes real hardware, a container, or a virtual machine.
A state that allows a client and a backend to interact, communicating over a .Shared memory
RAM which is used by the processes common to an . It mirrors parts of files, provides a transient area for , and stores additional common information. Note that shared memory belongs to the complete instance, not to a single database.
For more information, see .SQL object
Most local objects belong to a specific in their containing database, such as (all types), (all types), data types, etc. The names of such objects of the same type in the same schema are enforced to be unique.
There also exist local objects that do not belong to schemas; some examples are , , and . The names of such objects of the same type are enforced to be unique within the database.
Other object types, such as , , replication origins, subscriptions for logical replication, and databases themselves are not local SQL objects since they exist entirely outside of any specific database; they are called global objects. The names of such objects are enforced to be unique within the whole database cluster.
For more information, see .SQL standard
See .Stats collector (process)
This process collects statistical information about the 's activities.
For more information, see .System catalog
A collection of which describe the structure of all of the instance. The system catalog resides in the schema pg_catalog
. These tables contain data in internal representation and are not typically considered useful for user examination; a number of user-friendlier , also in schema pg_catalog
, offer more convenient access to some of that information, while additional tables and views exist in schema information_schema
(see ) that expose some of the same and additional information as mandated by the .
For more information, see .Table
A collection of having a common data structure (the same number of , in the same order, having the same name and type per position). A table is the most common form of in PostgreSQL.
For more information, see .Tablespace
A named location on the server file system. All which require storage beyond their definition in the must belong to a single tablespace. Initially, a database cluster contains a single usable tablespace which is used as the default for all SQL objects, called pg_default
.
For more information, see .Temporary table
that exist either for the lifetime of a or a , as specified at the time of creation. The data in them is not visible to other sessions, and is not . Temporary tables are often used to store intermediate data for a multi-step operation.
For more information, see .TOAST
For more information, see .Transaction
A combination of commands that must act as a single command: they all succeed or all fail as a single unit, and their effects are not visible to other until the transaction is complete, and possibly even later, depending on the isolation level.
For more information, see .Transaction ID
For more information, see .Transactions per second (TPS)
A which can be defined to execute whenever a certain operation (INSERT
, UPDATE
, DELETE
, TRUNCATE
) is applied to a . A trigger executes within the same as the statement which invoked it, and if the function fails, then the invoking statement also fails.
For more information, see .Tuple
A collection of in a fixed order. That order may be defined by the (or other ) where the tuple is contained, in which case the tuple is often called a row. It may also be defined by the structure of a result set, in which case it is sometimes called a record.Unique constraint
A type of defined on a which restricts the values allowed in one or a combination of columns so that each value or combination of values can only appear once in the relation — that is, no other row in the relation contains values that are equal to those.
Because are not considered equal to each other, multiple rows with null values are allowed to exist without violating the unique constraint.Unlogged
The property of certain that the changes to them are not reflected in the . This disables replication and crash recovery for these relations.
are always unlogged.Update
An SQL command used to modify that may already exist in a specified . It cannot create or remove rows.
For more information, see .User
A that has the LOGIN
privilege.User mapping
The translation of login credentials in the local to credentials in a remote data system defined by a .
For more information, see .Vacuum
The process of removing outdated from tables or materialized views, and other closely related processing required by PostgreSQL's implementation of . This can be initiated through the use of the VACUUM
command, but can also be handled automatically via processes.
For more information, see .View
A that is defined by a SELECT
statement, but has no storage of its own. Any time a query references a view, the definition of the view is substituted into the query as if the user had typed it as a subquery instead of the name of the view.
For more information, see .Visibility map (fork)
See .WAL archiver (process)
A process that saves copies of for the purpose of creating backups or keeping current.
For more information, see .WAL file
Also known as WAL segment or WAL segment file. Each of the sequentially-numbered files that provide storage space for . The files are all of the same predefined size and are written in sequential order, interspersing changes as they occur in multiple simultaneous sessions. If the system crashes, the files are read in order, and each of the changes is replayed to restore the system to the state it was in before the crash.
Each WAL file can be released after a writes all the changes in it to the corresponding data files. Releasing the file can be done either by deleting it, or by changing its name so that it will be used in the future, which is called recycling.
For more information, see .WAL record
For more information, see .WAL segment
See .WAL writer (process)
A process that writes from to .
For more information, see .Window function (routine)
A type of used in a that applies to a of the query's ; the function's result is based on values found in of the same partition or frame.
All can be used as window functions, but window functions can also be used to, for example, give ranks to each of the rows in the partition. Also known as analytic functions.
For more information, see .Write-ahead log
The journal that keeps track of the changes in the as user- and system-invoked operations take place. It comprises many individual written sequentially to .