glossary
484 terms, one line each. every one links to the chapter that explains it properly.
everything.glossary
a
- aborted transaction
- a transaction after an error. it refuses every statement (25P02) until ROLLBACK, and COMMIT turns into ROLLBACK. read more
- access method
- an index type: btree, hash, GiST, SP-GiST, GIN or BRIN. listed in pg_am. read more
- ACID
- atomicity, consistency, isolation, durability: four promises about transactions, kept by different parts of the system. read more
- adjacency list
- a tree stored as one parent pointer per row, like manager_id. walked with a recursive CTE. read more
- advisory lock
- a lock on a number you choose, held in the lock manager but never taken by postgres for you. read more
- aggregate function
- folds many rows into one value: count, sum, avg, min, max. every one but count(*) skips NULLs. read more
- alignment padding
- empty bytes before a column so it starts at a multiple of its type's alignment (typalign: 1, 2, 4 or 8). read more
- ANALYZE
- the command that samples a table and writes its per-column statistics. autovacuum runs it after 50 + 10% of the rows change. read more
- analyzer
- the stage that looks every name in a query up in the catalog. 'does not exist' errors come from here. read more
- anti join
- keep the left rows that match no right row at all. written NOT EXISTS, or a LEFT JOIN keeping only padded rows. read more
- arbiter index
- the unique index ON CONFLICT uses to detect a conflict, and to wait on another session's uncommitted insert. read more
- ARIES
- the textbook recovery algorithm (Mohan et al., 1992): analysis, redo that repeats history, then undo of the losers. read more
- array
- a typed list in one column, like text[]. subscripts start at 1; = ANY, @>, && and unnest work with it. read more
- attribute
- a column, in Codd's words: a named, typed slot that every row has. read more
- attribute closure
- everything a set of columns determines, found by applying dependencies until nothing new is added. all columns means a superkey. read more
- audit table
- a log of changes, one row per insert, update or delete, usually written by a trigger in the same transaction. read more
- auto_explain
- a module that logs the plan of any statement slower than auto_explain.log_min_duration, as it actually ran. read more
- autocommit
- running each statement as its own transaction, committed as soon as it finishes. what you get without BEGIN. read more
- autovacuum
- the background launcher and workers that vacuum and analyze tables once enough rows changed. read more
b
- B-tree
- the default index type: a balanced tree of sorted keys, a few levels deep, with linked leaves. read more
- background writer
- the process that writes dirty buffers just ahead of the clock hand, so backends rarely have to. read more
- bag
- a collection that allows duplicates. SQL tables are bags; Codd's relations are sets. read more
- base backup
- a copy of the data directory taken while the server runs, with a backup_label saying where WAL replay must start. read more
- batch
- a slice of a hash join's or hash aggregate's input, split off by hash when the table doesn't fit in memory and parked in a temp file. read more
- BCNF
- Boyce-Codd normal form: every determinant of a non-trivial dependency is a key. 3NF almost always is BCNF. read more
- bind parameter
- a $1-style slot in a statement whose value is sent separately, after parsing, so it can only ever be a value. read more
- bitmap heap scan
- collect matching row addresses from indexes into a bitmap, then read each table page once, in order. read more
- bloat
- space a table or index takes beyond what its live rows need: dead tuples and free space not yet reused. read more
- block range
- a run of table pages BRIN summarizes as one entry, 128 by default. read more
- blocking node
- a plan node that reads all of its input before returning a row: a Sort, a Hash, a HashAggregate. read more
- bloom filter
- a bit array and k hashes that answers definitely not or maybe. about 1% false positives at 10 bits per key. read more
- bottom-up deletion
- postgres 14+: before a leaf splits, deleting entries whose row versions are dead, left by updates that didn't change the key. read more
- bounding box
- the smallest rectangle around a set of shapes or points. GiST's inner pages store one per child. read more
- bucket
- one slot of a hash index: a primary page plus any overflow pages, holding the entries whose hash picks it. read more
- buffer pool
- postgres's shared cache of pages in memory. every read goes through it. read more
- buffer table
- the shared hash table that maps a page (relation, fork, block) to the buffer frame holding it. read more
c
- C collation
- comparing text by its bytes: capitals before small letters, accented letters after both. what the browser engine uses. read more
- candidate key
- a minimal set of columns that identifies a row: drop any column and it stops being unique. a table can have several. read more
- CAP theorem
- during a network partition, a replicated register can't be both linearizable and available. conjectured by Brewer, proved by Gilbert and Lynch. read more
- cardinality
- how many rows on one side of a relationship can go with one row on the other: one-to-one, one-to-many, many-to-many. read more
- CASE
- if/else as an expression: the first WHEN that's true gives the value, otherwise the ELSE, otherwise NULL. read more
- cast
- turning a value of one type into another, written CAST(x AS t) or x::t. a cast from text is a parse and can fail. read more
- causal consistency
- operations that could have influenced each other are seen in that order everywhere; unrelated ones may appear in any order. read more
- check constraint
- a boolean expression every row must not make false. NULL passes, because unknown isn't false. read more
- checkpoint
- the moment postgres has written every dirty page, so recovery can start from there. read more
- checkpointer
- the process that writes every dirty buffer for a checkpoint, then fsyncs the files. read more
- clause
- one keyword-led part of a statement, like FROM products or WHERE NOT discontinued. in a SELECT, each takes a table and hands one on. read more
- cleanup lock
- a buffer's content lock plus no other pins. VACUUM needs it to remove dead tuples from a page. read more
- clock sweep
- postgres's buffer replacement: a hand goes round the frames, lowering usage counts, and evicts the first one at zero. read more
- closure
- every relational operation takes tables and returns a table, so an answer can be queried again. read more
- closure table
- a tree stored as one row per (ancestor, descendant) pair, so subtree and ancestor queries are one lookup. read more
- CLR
- compensation log record: in ARIES, the log entry for undoing a change, with an undoNextLSN so nothing is undone twice. read more
- clustered index
- a b-tree whose leaves hold the rows themselves, in key order. InnoDB tables are one; postgres tables are heaps read more
- COALESCE
- returns its first argument that isn't NULL. an empty string or a 0 counts as a value. read more
- collation
- the rules a database uses to order and compare text. C is byte order; ICU collations sort like a dictionary in a given language. read more
- column alias
- a name SELECT gives an output column with AS. it exists from SELECT on, so ORDER BY can use it and WHERE can't. read more
- columnar storage
- storing each column's values together instead of each row's, so a scan reads only the columns it names read more
- command tag
- what postgres sends after each statement, like SELECT 4 or INSERT 0 1: the command and a row count. read more
- commitfest
- a month-long round of reviewing postgres patches, tracked in the commitfest app read more
- compaction
- an LSM tree's background merge of sorted files into bigger ones, dropping overwritten values and tombstones. read more
- composite key
- a key made of more than one column, like (order_id, line_no). its column order is the order of its index. read more
- conflict matrix
- the table of which lock modes can be held on one object at the same time. anything else waits. read more
- conflict serializability
- a schedule whose conflicting pairs are all in the same order as in some serial run. tested with a precedence graph. read more
- connection pool
- a small set of open server connections lent out to many clients, so the server runs near the work it can do at once and the rest wait cheaply. read more
- COPY
- moves rows in bulk between a table and a file or a client stream, in one statement, without parsing each row as SQL. read more
- correlation
- from -1 to 1, how closely a column's order matches the rows' physical order. near 1 or -1 makes index scans cheap. read more
- cost
- the planner's price for a plan, in made-up units where one page read in order is 1.0. compared between plans, never a time. read more
- covering index
- an index that holds every column a query needs, so the query can be an index-only scan. read more
- cpu_tuple_cost
- the price of handling one row in a plan node. 0.01 by default, next to cpu_index_tuple_cost (0.005) and cpu_operator_cost (0.0025). read more
- crash recovery
- on start after a crash: replay the WAL from the redo pointer to its end, skipping pages that already have each change. no undo. read more
- cross product
- every row of one table paired with every row of another: n × m rows. every join starts from it, on paper. read more
- CTE
- common table expression: a subquery named in WITH at the top of a statement, usable like a table below it. read more
- ctid
- a row version's physical address: (page number, slot number). read more
- CUBE
- CUBE (a, b) is every subset of its columns as a grouping set: (a, b), (a), (b) and (). read more
- custom plan
- a plan for a prepared statement made for the actual parameter values. the first five executions always get one. read more
d
- data checksum
- a 16-bit checksum stamped on each page as it's written and checked as it's read. on by default since postgres 18. detects, never repairs. read more
- data independence
- changing how data is stored (an index, a disk) without changing the queries that read it. read more
- data-modifying CTE
- an INSERT, UPDATE, DELETE or MERGE inside WITH, whose RETURNING rows feed the rest of the statement. read more
- database
- an organised collection of data plus the program that keeps it safe, shared and queryable. read more
- date spine
- a row for every date in a range, from generate_series, LEFT JOINed to the data so empty days still get a row. read more
- DBMS
- database management system. the program around the data: storage, queries, transactions, recovery. read more
- dead tuple
- a tuple version no snapshot can see anymore. it takes up space until VACUUM or pruning removes it. read more
- deadlock
- two or more transactions each waiting for a lock another one holds. postgres cancels one with 40P01. read more
- deadlock_timeout
- how long a waiting backend sleeps before it checks for a deadlock itself. 1 s by default. not a limit on waiting. read more
- declarative
- describing the result you want and leaving the steps to the system. SQL works this way. read more
- deduplication
- postgres 13+: merging b-tree entries with equal keys into posting lists, just before a leaf would split. read more
- DEFAULT
- the value a column gets when an INSERT leaves it out or asks for it by name. NULL if the column declares none. read more
- default partition
- the partition that takes rows no other partition accepts. it has to be checked whenever a new partition is added. read more
- default selectivity
- the fixed guess the planner uses when no statistics apply: 0.005 for =, 1/3 for <, 0.005 for a range. read more
- default_statistics_target
- how detailed column statistics are: up to this many MCVs and histogram buckets, from a sample of 300 times this many rows. 100 by default. read more
- deferrable constraint
- a constraint whose check can wait until the end of the statement or, if deferred, until COMMIT. read more
- DELETE
- removes every row its WHERE matches. the rows stay on their pages, marked deleted, until VACUUM. read more
- denormalization
- storing a derivable fact twice on purpose, like a count or a total, to make reads cheaper. something has to keep the copy right. read more
- derived table
- a subquery in FROM, used as a table for one query. postgres 16 made its alias optional. read more
- DETAIL
- the part of a postgres error that gives the facts of the case: which key, which row, which value. read more
- dialect
- one database's version of SQL: the standard, plus its own extensions, minus what it skips. read more
- dictionary encoding
- replacing each value of a column with a small code into a list of its distinct values read more
- dirty page
- a page in shared buffers that has changed since it was last written to its file. normal, not an error. read more
- dirty read
- reading another transaction's uncommitted write. the standard allows it at READ UNCOMMITTED; postgres never does it. read more
- disaggregated storage
- storage moved out of the database server into a replicated service that compute nodes share, as in aurora and neon. read more
- DISTINCT
- removes duplicate output rows, comparing whole rows after SELECT. two NULLs count as duplicates. read more
- DISTINCT ON
- postgres only: keeps the first row for each value of its keys, first by the ORDER BY, which must start with them. read more
- domain
- an existing type with constraints attached under a new name, checked whenever a value becomes that type. read more
- double buffering
- the same page cached twice: in shared buffers and in the operating system's page cache under it. read more
e
- eager loading
- fetching a relation up front for every row, with a join or one WHERE id = ANY($1) query, instead of once per row on first access. read more
- EAV
- entity-attribute-value: one row per cell, every value text. no types, no constraints, a join per attribute. read more
- effective_cache_size
- how much of the database the planner may assume is cached. not memory it allocates: an input to the index scan's cache model. read more
- enable_* settings
- switches like enable_seqscan and enable_hashjoin. off doesn't forbid: postgres 18 avoids disabled nodes and prints Disabled: true when it can't. read more
- entity
- a thing with its own identity that you look up or count, like a customer or an order. it becomes a table with a key. read more
- enum
- a type whose values are a fixed list of labels, sorted in the order they were declared. you can add labels but never drop one. read more
- equi-join
- a join whose ON is an = between a column on each side. the common case, and the only one a venn diagram tries to draw. read more
- error position
- where in your statement postgres gave up, drawn as a caret (^) under that character. read more
- EvalPlanQual
- at READ COMMITTED, an UPDATE or DELETE that waited for a row re-checks its WHERE on the row's newest version. read more
- eventual consistency
- if writes stop, every copy eventually returns the same value. nothing is promised about reads in the meantime. read more
- EXCLUDED
- inside ON CONFLICT DO UPDATE, the row you tried to insert, as opposed to the row already in the table. read more
- exclusion constraint
- a generalised UNIQUE: no two rows may satisfy an operator, like && for overlapping ranges. enforced by a GiST index. read more
- expanded display
- psql's \x mode: one line per column, for rows too wide to read. read more
- EXPLAIN
- the command that shows the plan postgres picked for a query, with its cost estimates. read more
- EXPLAIN ANALYZE
- EXPLAIN that runs the query and prints actual rows, loops and buffers next to every estimate. it really executes DML. read more
- expression
- anything that computes a value from a row: a column, a literal, a function call, price * 1.2. SELECT runs its list once per row. read more
- expression index
- an index on a computed value like lower(email). the query has to use the same expression. read more
- extended query protocol
- the wire protocol drivers use for parameters: Parse the SQL, Bind the values, Execute. one statement per Parse. read more
- extended statistics
- statistics on a combination of columns or an expression, declared with CREATE STATISTICS: dependencies, ndistinct, mcv. read more
- external sort
- a sort too big for work_mem: sorted runs written to temp files, then merged. read more
f
- failover slot
- a logical slot (postgres 17+) that a standby keeps in sync, so logical subscribers carry on after a failover. read more
- fan-out
- a one-to-many join repeating the one side once per match, so sums, counts and averages over it come out inflated. read more
- fanout
- how many children an index page points at. hundreds in a b-tree, which is why it stays three or four levels deep. read more
- FETCH FIRST
- the standard spelling of LIMIT: FETCH FIRST 10 ROWS ONLY. postgres accepts both. read more
- fillfactor
- how full an INSERT packs a page. lower than 100 leaves room so updates can stay on the same page. read more
- FILTER clause
- FILTER (WHERE ...) after an aggregate: that one aggregate only sees the rows where the condition holds. read more
- float8
- double precision: an IEEE 754 binary float, fast and approximate. it can't hold 0.1 exactly, so never compare it with =. read more
- FOR UPDATE
- a SELECT clause that locks the returned rows until the transaction ends. weaker forms: FOR NO KEY UPDATE, FOR SHARE, FOR KEY SHARE. read more
- foreign key
- a column that must match a key in another table. the database checks it on every write. read more
- fork
- one of a relation's files, told apart by suffix: main (the pages), _fsm, _vm, and _init for unlogged tables. read more
- frame exclusion
- EXCLUDE CURRENT ROW, GROUP or TIES: takes rows back out of a frame after the bounds have chosen it. read more
- free space map
- a fork that records roughly how much room each page has, as a tree of max values, so inserts find space fast. read more
- freezing
- marking a tuple as older than every transaction, so wraparound can't make it disappear. two infomask bits. read more
- full-page image
- a copy of a whole page inside a WAL record, written on the first change after a checkpoint so redo never needs the file's copy. read more
- function inlining
- the planner pasting a simple LANGUAGE sql function's body into the query, so it plans as if you'd typed it out. read more
- functional dependency
- X → Y: any two rows that agree on X agree on Y. a rule from what the columns mean; data can only disprove it. read more
g
- gap lock
- an InnoDB lock on the space between index records, so nobody can insert into a range you scanned read more
- gaps and islands
- finding runs of consecutive values (islands) and the holes between them. value minus row_number is constant inside a run. read more
- Gather
- the plan node that starts parallel workers and collects their rows. Gather Merge keeps them sorted. read more
- generated column
- a read-only column computed from its own row. STORED keeps the value on disk; VIRTUAL, the default since 18, computes it on read. read more
- generic plan
- a plan for a prepared statement made for any value ($1 in EXPLAIN). used from the sixth execution if it's not dearer than the custom plans. read more
- GEQO
- the genetic query optimizer: a randomized join order search used from geqo_threshold (12) items, faster and not always the best plan. read more
- golden
- the book's recorded output for a code block. a run in your browser is compared with it. read more
- grain
- what one row of a result stands for: one order, one order line, one customer. a sum is only right at its own grain. read more
- GROUP BY
- sorts rows into buckets, one per different key, and hands on one row per bucket. read more
- group commit
- backends committing at the same moment share one WAL flush, so a slow disk serves many commits per fsync. read more
- GroupAggregate
- GROUP BY over input sorted on the group key: each group comes out as soon as the key changes. read more
- grouping sets
- several GROUP BYs in one query, their results stacked. a column a set doesn't group by comes out NULL. read more
- GROUPING()
- 1 when its column was rolled up in this row's grouping set, 0 when it was grouped. tells a subtotal's NULL from a real one. read more
h
- hash join
- build a hash table on the smaller input, then probe it with each row of the bigger one. equality only. read more
- hash_mem_multiplier
- how many times work_mem a hash table may use. 2 by default since postgres 15. read more
- HashAggregate
- GROUP BY with a hash table, one entry per group. any input order; everything comes out at the end. read more
- HAVING
- filters buckets after GROUP BY, so it can use aggregates. a condition on single rows belongs in WHERE. read more
- heading
- the names and types of a relation's columns: its shape, without the rows. read more
- heap fetch
- a trip from an index-only scan to the table, for a page not marked all-visible. EXPLAIN counts them as Heap Fetches. read more
- high key
- the first item on every non-rightmost b-tree page: an upper bound for the page's keys, pointing at no row. read more
- HINT
- the part of a postgres error that suggests a fix. it's a guess, and it can be wrong. read more
- hint bits
- commit status flags a reader writes into a tuple header after looking it up in pg_xact, so the next reader doesn't have to. read more
- histogram
- bounds that cut a column's non-MCV values into buckets holding the same number of rows. range estimates interpolate inside a bucket. read more
- HNSW
- hierarchical navigable small world: a layered graph searched greedily, for approximate nearest neighbours. read more
- hot row
- a single row many transactions update, like a global counter. each update waits for the previous one's row lock. read more
- hot shard
- a shard that gets far more load than the others, from a busy key or a key like time that sends every new write to one place. read more
- HOT update
- an UPDATE whose new version stays on the same page with no indexed column changed, so no index entry is written. read more
- hypothetical-set aggregate
- where a value would land if it were in the group: rank(88000) WITHIN GROUP (ORDER BY salary DESC). read more
i
- identity column
- a column numbered by its own sequence: GENERATED ALWAYS (or BY DEFAULT) AS IDENTITY. the standard form of serial. read more
- idle in transaction
- a session with an open transaction that isn't running a statement. it still holds its locks and its snapshot. read more
- implicit cast
- a cast pg_cast lets postgres add on its own, anywhere it helps, like integer to bigint. assignment casts only happen when storing into a column. read more
- incremental sort
- sorting input that's already sorted on the leading keys, one group at a time. it can stop early under a LIMIT. read more
- independence assumption
- the planner multiplies the selectivities of conditions on different columns, as if they were unrelated. correlated columns break it. read more
- index
- a separate, sorted structure that points back at table rows so lookups skip the full scan. read more
- index scan
- walking an index and fetching each matching row from the table as it goes, in index order. read more
- Index Searches
- the EXPLAIN ANALYZE line (postgres 18+) counting how many times an index scan went down the tree. read more
- index-only scan
- a scan answered from the index alone, for pages the visibility map marks all-visible. read more
- inner join
- the pairs of rows where ON is true, and nothing else. a row with no partner is left out. read more
- input column
- a column of the table FROM built. a name inside an expression is always looked up here, even in ORDER BY. read more
- INSERT
- adds whole rows to a table: name the columns, give the values, one row or many per statement. read more
- INSERT ... SELECT
- fills a table from a query's result in one statement, without the rows ever leaving the database. read more
- interval
- a span of time stored as three separate counts: months, days and microseconds. + 1 month clamps to the month's end. read more
- inverted index
- an index with one entry per element (word, tag, key) listing the rows that contain it. GIN is one. read more
- io_method
- postgres 18's setting for who performs asynchronous reads: worker (the default), io_uring, or sync. read more
- IS DISTINCT FROM
- a comparison that treats NULL as a value: two NULLs are not distinct, NULL and 5 are. it never answers unknown. read more
- isolation level
- how much of other transactions' work a transaction may see while they run. read more
- iterator model
- every plan node answers next() with one row, pulling from its children, so rows flow up the plan one at a time. read more
- IVFFlat
- a vector index that clusters vectors into lists and scans only the nearest few (ivfflat.probes). read more
j
- join
- combining rows from two tables: a cross product filtered by a condition. read more
- join order
- which tables are joined first. n tables have n! left-deep orders; postgres searches them with dynamic programming over sets of tables. read more
- join_collapse_limit
- how many explicit JOIN items the planner reorders at once (8). at 1, joins happen in the order written. from_collapse_limit is its twin for FROM lists. read more
- JSON_TABLE
- turns a json document into rows and typed columns using paths. postgres 17 and later. read more
- jsonb
- json parsed into a binary form: keys sorted and deduplicated, indexable with GIN. json keeps the original text instead. read more
- jsonpath
- a small query language for json values, used by @?, @@ and the jsonb_path_* functions. read more
- junction table
- a table with a foreign key to each side of a many-to-many relationship, one row per pair, holding the relationship's own columns. read more
k
- keyset pagination
- paging by remembering the last row seen: WHERE (a, id) > (last_a, last_id), instead of OFFSET. read more
l
- LAG
- lag(x, n, default): x from n rows before the current one in the window's order. LEAD looks ahead. read more
- latch crabbing
- the textbook way to descend a b-tree safely: latch the child before releasing the parent, keep ancestors while a split could reach them. read more
- LATERAL
- lets a subquery or function in FROM use columns of the tables to its left, so it runs once per left row. read more
- leftmost prefix
- the leading columns of a multicolumn index. an index on (a, b) narrows scans on a, or on a and b. read more
- LIKE
- matches text against a pattern: % is any run of characters, _ is exactly one. case-sensitive; ILIKE isn't. read more
- line pointer
- a 4-byte slot near the top of a page holding a tuple's offset, length and flags. the second number in a ctid. read more
- linear hashing
- growing a hash table one bucket at a time, rehashing only the one bucket that splits. how postgres's hash index grows. read more
- linearizability
- each operation appears to take effect at one instant between its call and its return, so a finished write is seen by every later read. read more
- lock
- a claim on a table or row that makes conflicting transactions wait. read more
- lock mode
- how a lock may be shared. postgres has eight for tables, from ACCESS SHARE to ACCESS EXCLUSIVE. read more
- lock ordering
- taking locks in one agreed order everywhere (lower id first), so waits can't form a cycle. read more
- lock queue
- the waiters for one object, first come first served. a new request waits behind any queued request it conflicts with. read more
- lock_timeout
- the longest a statement may wait for any one lock before it fails with 55P03. off by default. read more
- logical decoding
- turning WAL back into committed row changes, per table, through an output plugin like pgoutput or test_decoding. read more
- logical order
- the order the clauses of a SELECT take effect: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT. read more
- loops
- how many times a plan node was run. actual rows is per loop, so the total is rows × loops. read more
- lossless decomposition
- a split of one table into several whose join gives back exactly the original rows. splitting along a dependency guarantees it. read more
- lossy bitmap
- a bitmap that ran out of work_mem and only remembers pages, not rows, so every row on them is rechecked. read more
- lost update
- two transactions read a value, each writes back its own new value, and the second write silently replaces the first. read more
- LP_DEAD
- a hint bit on an index entry: its row is dead to everyone, so the entry can be removed without checking the heap again. read more
- LSM tree
- log-structured merge tree: writes go to a memtable, flushed to immutable sorted files that compaction merges. read more
- LSN
- log sequence number: a byte position in the WAL, printed as two hex halves like 0/17E9D28. pages store the last one that changed them. read more
- LWLock
- a lightweight lock on a shared memory structure, shared or exclusive, held for microseconds. a wait event, never in pg_locks. read more
m
- Materialize
- a plan node that keeps its child's rows so they can be read again without redoing the work below. read more
- materialized CTE
- a CTE computed once into a temporary result that the query reads. the default when it's used twice, or forced with MATERIALIZED. read more
- materialized path
- a tree stored as each row's path from the root, like 1.2.5, so a subtree is a prefix match. ltree is postgres's type for it. read more
- materialized view
- a query's result stored as a table, stale until REFRESH. CONCURRENTLY keeps readers going and needs a unique index. read more
- max_connections
- the most client connections a server accepts at once. 100 by default, each one a backend process; a few slots are kept for superusers. read more
- MCV list
- a column's most common values and the fraction of rows each one has, in pg_stats. equality on one of them is estimated exactly. read more
- Memoize
- a cache between a nested loop and its inner side, keyed on the join value. hits skip the lookup. read more
- memtable
- the sorted in-memory buffer an LSM tree writes to first, flushed to disk when full. read more
- MERGE
- syncs a target table with a source: WHEN MATCHED, WHEN NOT MATCHED and WHEN NOT MATCHED BY SOURCE clauses, one statement. read more
- merge join
- walk two inputs sorted on the join key with two cursors, stepping back over runs of equal keys. read more
- meta-command
- a psql command that starts with a backslash, like \d or \x. psql handles it; the server never sees it as typed. read more
- metapage
- page 0 of an index: where the root is, how tall the tree is, or a hash index's bucket masks. bt_metap reads it. read more
- minus infinity downlink
- the first item of an inner b-tree page: a child pointer with no key, for everything below the first separator. read more
- misestimate
- a row estimate far from the actual count (10x is the usual alarm). low in a plan, it compounds into bad join choices above. read more
- multirange
- an ordered set of non-overlapping ranges in one value, like {[1,3),[5,8)}. postgres 14 and later; range_agg builds one. read more
- MultiXact
- an id standing for several transactions that lock one row at once, stored in xmax. its own 32-bit counter. read more
- MVCC
- multi-version concurrency control. writers create new row versions so readers never wait. read more
n
- n_distinct
- the number of distinct values in a column. negative means a fraction of the row count: -1 is unique. read more
- N+1
- one query for a list, then one more per row for a relation, usually from lazy loading in an ORM. each is fast; the round trips add up. read more
- natural join
- a join on every column name the two tables share, worked out when the query runs. fragile: a new column changes it. read more
- natural key
- a key that comes from the world, like an email, an isbn or a sku. readable, and it can change. read more
- nested loop
- a join that runs its inner side once for every outer row. the only join for non-equality conditions. read more
- nested sets
- a tree numbered by a depth-first walk, each node holding lft and rgt; a subtree is a range, and an insert renumbers. read more
- next-key lock
- an InnoDB record lock plus a gap lock on the gap before it, used by locking reads at REPEATABLE READ read more
- non-repeatable read
- reading the same row twice in one transaction and getting two values, because someone committed in between. read more
- nondeterministic collation
- an ICU collation that can call different strings equal, like Zoë and ZOË under und-u-ks-level2. postgres's way to compare without case. read more
- normal form
- a rule about how facts are split across tables so each one is stored once. read more
- NOT ENFORCED
- a CHECK or foreign key (postgres 18) that's recorded in the catalog but never checked. read more
- NOT IN trap
- x NOT IN (subquery) returns no rows at all when the subquery returns a NULL, because x <> NULL is never true. read more
- NOT VALID
- adds a constraint without checking existing rows; new rows are checked at once, and VALIDATE CONSTRAINT checks the old ones later without blocking writes. read more
- NOWAIT
- makes a locking read fail at once with 55P03 instead of waiting for a row someone else holds. read more
- NULL
- a marker for a missing or unknown value. not zero, not empty, not equal to anything, not even itself. read more
- null bitmap
- one bit per column after the tuple header, present only when the row has a NULL. a NULL takes no other space. read more
- NULL padding
- the NULLs an outer join puts in the other table's columns for a row that found no partner. nobody stored them. read more
- null_frac
- the fraction of a column's rows that are NULL, in pg_stats. read more
- NULLIF
- NULLIF(a, b) returns NULL when a equals b, and a otherwise. the divide-by-zero guard: x / NULLIF(y, 0). read more
- NULLS FIRST
- a sort option that puts NULLs before every value. postgres's default is NULLS LAST going up and NULLS FIRST going down. read more
- NULLS NOT DISTINCT
- a UNIQUE option (postgres 15) that treats NULLs as equal, so a second NULL is a duplicate. read more
- numeric
- exact decimal arithmetic at any size, numeric(p, s) to fix the scale. slower and bigger than integers or floats, right for money. read more
o
- OCC
- optimistic concurrency control: run on private copies, validate at the end, abort if something you read changed. read more
- OFFSET
- skips the first n rows of a result. it reads every row it skips, so deep pages get slower. read more
- OID
- object identifier: the number every catalog row has. after analysis, postgres refers to tables, types and functions by it. read more
- OLD and NEW
- in RETURNING since postgres 18, the row before and after the change. in a trigger, the same two rows. read more
- ON CONFLICT
- the INSERT clause that says what to do when a unique index finds the key taken: DO NOTHING or DO UPDATE. read more
- operator class
- which operators an index type can serve for a data type, like gin jsonb_path_ops or btree text_pattern_ops. read more
- operator precedence
- which operator binds first when there are no parentheses: NOT, then AND, then OR. read more
- optimistic locking
- no lock while reading; the UPDATE checks a version column, and UPDATE 0 means someone changed the row first. read more
- ordered-set aggregate
- an aggregate that needs its input sorted, given in WITHIN GROUP (ORDER BY ...): percentile_cont, percentile_disc, mode. read more
- outer join
- an inner join plus the rows that matched nothing, from one side (LEFT, RIGHT) or both (FULL), padded with NULLs. read more
- output column
- a column of the result, named by SELECT. ORDER BY and GROUP BY may refer to one by name or position, WHERE and HAVING never. read more
- overflow page
- an extra page chained to a full hash bucket. many duplicates make long chains. read more
p
- PACELC
- Abadi's extension of CAP: if partitioned, availability or consistency; else, latency or consistency. read more
- page
- the 8 KB block postgres reads and writes. every table and index is a file of pages. read more
- page header
- the first 24 bytes of every page: its LSN, checksum, flags, pd_lower, pd_upper, pd_special and prune xid. read more
- page split
- what happens when an index page is full: part of it moves to a new page, linked in beside it, with a new downlink above. read more
- pageinspect
- the extension that reads raw pages: page_header(), heap_page_items(), bt_page_items() and friends. read more
- parallel worker
- a background process that runs part of a plan for a parallel query, next to the leader. read more
- parse tree
- the tree of words the parser builds from your text, checked against the grammar and nothing else. read more
- partial aggregate
- an aggregate split into a Partial step per piece (worker or partition) and a Finalize step that combines them. read more
- partial index
- an index with a WHERE clause: it holds only the rows that match it. read more
- partition (window)
- the group of rows a window function works within, set by PARTITION BY. no PARTITION BY means one partition: every row. read more
- partition pruning
- skipping partitions that can't match the WHERE on the partition key: while planning, at executor start (Subplans Removed) or while running (never executed). read more
- partitioned table
- one table name over several real tables, split by a partition key into ranges, lists of values or hash buckets. read more
- path
- one way to produce a table or a join (a seq scan, an index scan, a hash join), with its cost. the planner keeps the cheapest ones. read more
- peer
- a row that ties with the current row on the window's ORDER BY. RANGE and GROUPS frames take peers as a block. read more
- pending list
- an unsorted list of new GIN entries, merged into the index in bulk later. on by default with fastupdate. read more
- percentile_cont
- the value at a fraction of the sorted input, interpolated between neighbours. percentile_cont(0.5) is the median. read more
- percentile_disc
- the first real value at or past a fraction of the sorted input. never interpolates, so it works on any sortable type. read more
- pg_buffercache
- the extension that lists every buffer frame: which page it holds, its usage count, and whether it's dirty or pinned. read more
- pg_control
- the small file in global/ that says whether the cluster shut down cleanly and where the last checkpoint and redo pointer are. read more
- pg_hint_plan
- an extension that reads planner hints from comments. core postgres has no hints. read more
- pg_locks
- the view of the lock manager: one row per lock held or waited for, with its locktype, mode and granted flag. read more
- pg_stat_statements
- an extension that totals calls, rows, time and pages per normalized statement. needs shared_preload_libraries. read more
- pg_stats
- the readable view of the statistics ANALYZE collects: one row per column, from the pg_statistic catalog. read more
- pg_walinspect
- the extension that reads WAL from SQL: pg_get_wal_records_info, pg_get_wal_block_info, pg_get_wal_stats. read more
- pg_xact
- the commit log: two bits per transaction id saying in progress, committed, aborted or sub-committed. read more
- PGlite
- postgres compiled to webassembly. the engine running every query on this site. read more
- phantom
- running the same query twice in one transaction and getting a different set of rows, because rows were inserted or deleted. read more
- pin
- a backend's claim on a buffer while it uses the page. a pinned buffer can't be evicted. read more
- PITR
- point-in-time recovery: restore a base backup and replay archived WAL up to a chosen time, xid or LSN. read more
- pivot
- turning rows into columns: one filtered aggregate per output column, grouped by the row key. the columns must be known when the query is written. read more
- PL/pgSQL
- postgres's built-in procedural language: variables, IF, loops and exception handling, run inside the server. read more
- plan advice
- postgres 19's pg_plan_advice: EXPLAIN (PLAN_ADVICE) prints a plan's choices, and a setting feeds them back read more
- plan node
- one operator in a plan, like a Seq Scan or a Hash Join. each answers its parent's request for the next row. read more
- plan_cache_mode
- auto, force_custom_plan or force_generic_plan: whether prepared statements may switch to a generic plan. read more
- planner
- the part of postgres that turns a query into the cheapest plan it can find. read more
- polymorphic association
- a reference made of a type string and an id, pointing into a different table per row. no foreign key can check it. read more
- posting list
- one index key followed by a sorted list of heap addresses, instead of one entry per row. read more
- posting tree
- a GIN key's row addresses stored as a b-tree of their own, once there are too many for a posting list. read more
- precedence graph
- one node per transaction, an edge when one's operation conflicts with a later one of the other. a cycle means not serializable. read more
- predicate
- an expression that answers true, false or unknown, like price > 50. WHERE keeps the rows where it's true. read more
- prepared statement
- a statement parsed once with parameter slots and run many times with different values. PREPARE and EXECUTE in SQL. read more
- prepared transaction
- a transaction after PREPARE TRANSACTION: durable, detached from its session, holding its locks until COMMIT PREPARED or ROLLBACK PREPARED. survives restarts. read more
- primary key
- the column or columns that identify a row. unique and never NULL. read more
- procedure
- a named routine run with CALL. unlike a function it can COMMIT partway through, if not called inside BEGIN. read more
- projection
- the algebra's π: keep some columns. a set in the algebra, so SQL needs DISTINCT to match it. read more
- pruning
- cleanup of dead versions inside one page, done by any statement that reads a nearly full page. no VACUUM needed. read more
- psql
- postgres's terminal client. it sends SQL to a server and prints what comes back. read more
- publication
- the publisher's list of tables (and operations, rows, columns) to send by logical replication. a subscription pulls it. read more
q
- query
- a question written in SQL. the answer always comes back as a table. read more
- query plan
- the tree of operators the executor runs to answer a query. read more
- query tree
- the parse tree after analysis: every name replaced by an oid from the catalog. what views are stored as. read more
- query tuning
- reading a slow query's real plan, finding the node doing the work, and changing one thing read more
- quorum
- a set of replicas large enough that any two overlap. with n replicas, w + r > n makes every read meet the latest write. read more
r
- raft
- a consensus algorithm: a leader per term, a replicated log, and a majority to elect or commit anything. by Ongaro and Ousterhout. read more
- random_page_cost
- the price of one page read out of order, as an index scan does. 4.0 by default; about 1.1 is common on SSDs. read more
- range type
- a start and an end as one value, each bound inclusive or exclusive: int4range, daterange, tstzrange. && asks whether two overlap. read more
- ranking functions
- row_number numbers rows uniquely, rank ties and skips, dense_rank ties without skipping. they only differ on ties. read more
- read amplification
- pages or files read per lookup. with write and space amplification, the trade every storage engine makes. read more
- read replica
- a standby that answers read-only queries. always a little behind the primary. read more
- read skew
- two reads in one transaction taken at different moments, so together they describe a state that never existed. read more
- read stream
- code that knows which blocks it will read next, so it can ask early, combine neighbours and keep several reads in flight. read more
- read-your-writes
- a client always sees its own earlier writes. with replicas: route to the primary after a write, or wait until the replica has replayed the write's LSN. read more
- recall
- the fraction of the true nearest neighbours an approximate search returns. read more
- recursive CTE
- WITH RECURSIVE: an anchor, UNION ALL, and a part that refers to the CTE itself, repeated until it finds no new rows. read more
- redirect line pointer
- a line pointer left at the root of a pruned HOT chain, pointing at the chain's live version so index entries keep working. read more
- redo pointer
- the WAL position where the last checkpoint started. crash recovery replays from here; older WAL can be recycled. read more
- referential action
- what a foreign key does when its parent row is deleted or re-keyed: NO ACTION, RESTRICT, CASCADE, SET NULL or SET DEFAULT. read more
- regclass
- a type that turns a table name into its oid through the search_path, and prints an oid as a name. read more
- regular expression
- a pattern language for text. postgres matches POSIX regexes with ~, and ignores case with ~*. read more
- relation
- the formal name for a table: a set of rows that all share the same columns. read more
- relational algebra
- operators that take relations and return a relation: selection, projection, product, join, union, difference, rename. every query compiles into a tree of them. read more
- relational division
- the rows related to every member of a set, like students who took every CS course. a double NOT EXISTS, or a count. read more
- relational model
- Codd's 1970 idea: data as tables of values, linked by matching values, queried by describing the result. read more
- relfilenode
- the number a relation's files are named after. TRUNCATE and VACUUM FULL give a table a new one; its oid stays. read more
- REPACK
- postgres 19's command that rewrites a table to give space back; CONCURRENTLY does it without blocking writes read more
- replica identity
- the columns logical replication uses to find a row for UPDATE and DELETE: the primary key by default, or FULL. read more
- replication
- keeping a copy of the database on another server by shipping its changes. read more
- replication lag
- how far a standby is behind the primary, in bytes of WAL or in time. pg_stat_replication shows write, flush and replay lag. read more
- replication slot
- a primary's promise to keep WAL until a consumer has confirmed it. an abandoned slot fills pg_wal. read more
- resource manager
- the part of postgres that writes and replays one kind of WAL record: Heap, Btree, Transaction, XLOG and 18 more. read more
- retry loop
- application code that re-runs a whole transaction after 40001 or 40P01, with a cap and a random backoff. read more
- RETURNING
- makes INSERT, UPDATE, DELETE or MERGE hand back the rows it changed, in the same round trip. read more
- rewriter
- the stage that applies rules from pg_rewrite, which is how a view in FROM becomes its own query. read more
- right link
- every b-tree page's pointer to its right neighbour on the same level. lets a reader follow a split it didn't see. read more
- ring buffer
- a small private set of buffers a big seq scan, VACUUM or bulk write recycles, so it doesn't evict everyone's pages. read more
- role
- a user, a group, or both. it gets rights on objects with GRANT and nothing by default. read more
- rollback journal
- sqlite's default crash safety: copy the old pages aside, write new ones in place, delete the journal to commit read more
- ROLLUP
- ROLLUP (a, b) is the grouping sets (a, b), (a) and (): detail rows, a subtotal per a, a grand total. read more
- row comparison
- (a, b) > (x, y): compared column by column, like words in a dictionary. matches an index on (a, b). read more
- row estimate
- the rows= a plan node expects to return: a selectivity times the table's row count, before anything runs. read more
- row lock
- a lock on one row, stored in the tuple header (xmax plus infomask bits), not in the lock table. read more
- row-level security
- policies that add a condition to every query on a table: USING for rows you see, WITH CHECK for rows you write. read more
- rowid
- sqlite's 64-bit row key. a rowid table is a b-tree keyed by it, and INTEGER PRIMARY KEY becomes it read more
- run-length encoding
- compressing a column as (value, count) pairs, which shrinks sorted or repetitive columns to almost nothing read more
- running total
- a sum of every row so far: sum(x) OVER (ORDER BY ...), which uses the default frame. read more
- rw-antidependency
- a serializable transaction wrote what another one had read, so the reader must come first. two in a row: 40001. read more
s
- savepoint
- a named point inside a transaction you can roll back to without losing the work before it. read more
- scalar subquery
- a subquery that returns one value: one column, at most one row. more rows is an error, none is NULL. read more
- schedule
- the order in which the reads and writes of concurrent transactions actually ran. read more
- schema
- a namespace inside a database that holds tables and other objects. public is the default one. read more
- SEARCH and CYCLE
- recursive CTE clauses: SEARCH sets a depth-first or breadth-first sort column, CYCLE marks and stops a loop. postgres 14+. read more
- search_path
- the list of schemas postgres searches for an unqualified name. a better-typed function anywhere on it can hijack a call. read more
- secondary index
- any index other than the clustered one. in InnoDB its entries hold the primary key, so a lookup descends twice read more
- security_invoker
- a view option (postgres 15) that checks the caller's rights on the underlying tables instead of the view owner's. read more
- segment
- a relation's files are cut into 1 GB pieces: 16486, 16486.1, 16486.2. each holds 131,072 pages. read more
- selection
- the algebra's σ: keep the rows where a condition holds. WHERE in SQL, usually a Filter inside a scan in a plan. read more
- selectivity
- the fraction of a table's rows a condition matches. few rows favour an index, most rows a seq scan. read more
- self join
- a table joined to itself under two aliases, so a row can meet another row of the same table, like an employee and their manager. read more
- semi join
- keep each left row once if at least one right row matches. written EXISTS or IN, it never duplicates rows. read more
- separator key
- a key on an inner b-tree page that says where a child page's range starts. a copy, not the row's own entry. read more
- seq scan
- reading every page of a table in order and testing every row. read more
- seq_page_cost
- the price of one page read as part of a sequential run. 1.0 by default, the unit every other cost is measured in. read more
- sequence
- a counter object that hands out numbers with nextval. it never takes one back, so rollbacks leave gaps. read more
- serialization failure
- SQLSTATE 40001: postgres aborted a transaction to keep the result correct. retry the whole transaction. read more
- set operation
- UNION, INTERSECT or EXCEPT: two results with the same columns, stacked or compared row by row. read more
- set-returning function
- a function that returns rows instead of one value, like generate_series or unnest. in FROM it can see tables to its left. read more
- SIRead lock
- a note that a serializable transaction read a tuple, page or relation. it blocks nobody and outlives the commit. read more
- SKIP LOCKED
- makes a locking read leave out rows someone else holds. the job queue clause. read more
- skip scan
- postgres 18: using an index on (a, b) for a condition on b alone, with one search per value of a. read more
- snapshot
- xmin, xmax and the list of transactions in progress when it was taken. decides whose changes a query can see. read more
- snapshot isolation
- every read in a transaction comes from one snapshot, and two writers can't change the same row. postgres's REPEATABLE READ. read more
- soft delete
- marking a row as gone, usually with deleted_at, instead of deleting it. every query and constraint still sees the row. read more
- space partitioning
- splitting space into parts that never overlap, as SP-GiST does: quadtrees, k-d trees, radix trees. read more
- special space
- bytes at the end of a page kept for the access method. heap pages leave it empty, b-tree pages keep sibling links there. read more
- spinlock
- the shortest lock postgres has: a few instructions, taken by busy-waiting. shows up only as Timeout:SpinDelay. read more
- SQL
- the language you use to ask a relational database for data. you say what, it decides how. read more
- SQL injection
- user input that ends up parsed as SQL, because it was glued into the query text instead of bound as a value. read more
- SQL-standard function body
- a function body written as SQL statements (RETURN, BEGIN ATOMIC), parsed once and tracked as a dependency. read more
- SQLSTATE
- a five-character error code. the first two characters are the class, like 23 for broken constraints. read more
- SSI
- serializable snapshot isolation: snapshot isolation plus tracking of read/write dependencies. postgres's SERIALIZABLE. read more
- SSTable
- sorted string table: an immutable file of sorted keys an LSM tree writes when it flushes or compacts. read more
- standalone backend
- postgres running as a single process with no server around it. it's how PGlite runs. read more
- standby
- a server that stays in recovery, replaying WAL streamed from a primary. with hot standby it answers read-only queries. read more
- startup cost
- the first number in cost=a..b: the planner's estimate of the work before a node can return its first row. read more
- strict 2PL
- two-phase locking that holds write locks until commit, so nobody reads uncommitted data and aborts never cascade. read more
- strict serializability
- serializable transactions in an order that respects real time: serializability plus linearizability. read more
- SubPlan
- a subquery the planner couldn't turn into a join, run per outer row; hashed when its result fits in work_mem. an InitPlan runs once. read more
- subquery
- a SELECT in parentheses, used where a value or a table can go. read more
- subquery pull-up
- merging a subquery in FROM into the outer query, so its tables and conditions are planned together. LIMIT, aggregates and OFFSET 0 prevent it. read more
- subtransaction
- a transaction inside a transaction, as a savepoint or a PL/pgSQL EXCEPTION block starts. it gets its own xid if it writes. read more
- suppress_redundant_updates_trigger
- a built-in trigger function that skips an UPDATE when the new row equals the old one. read more
- surrogate key
- a key the database makes up, like an identity number or a uuid. it never changes, and it doesn't stop duplicate entities on its own. read more
- synchronous_commit
- what COMMIT waits for: nothing (off), the local flush (local, on), or a standby's write, flush or replay. read more
- system catalog
- the tables that describe every object in the database: pg_class, pg_attribute, pg_type, pg_namespace and more. read more
t
- t_ctid
- the header field that points from an old tuple version to the one that replaced it. the newest points at itself. read more
- temporal key
- a key unique per moment: the same key may repeat as long as its ranges don't overlap. WITHOUT OVERLAPS in postgres 18. read more
- the SQL standard
- ISO/IEC 9075, the document that defines SQL. revised every few years; the latest is SQL:2023. read more
- three-valued logic
- SQL's logic with a third truth value, unknown, for comparisons involving NULL. read more
- timeline
- a numbered branch of WAL history. a promoted standby or a PITR restore starts a new one, recorded in a .history file. read more
- timestamp ordering
- concurrency control that fixes the serial order by start timestamp and aborts operations that arrive too late. read more
- timestamptz
- timestamp with time zone: an instant, stored as UTC, read and printed in the session's TimeZone. it stores no zone. read more
- TOAST
- how postgres stores values over about 2 KB: compressed first, then cut into chunks in a side table, with a pointer left in the row. read more
- toast pointer
- the 18 bytes left in a row in place of a value moved out to the toast table. read more
- top n per group
- the best n rows of every group: row_number in a subquery, a LATERAL ... LIMIT n per group, or DISTINCT ON for n = 1. read more
- top-N heapsort
- the sort a LIMIT gets: keep only the best n rows in a heap while reading everything. read more
- torn page
- a page only partly written when the power went: half new bytes, half old. WAL records alone can't repair one. read more
- total cost
- the second number in cost=a..b: the estimated work to return every row, children included, in units of one sequential page read. read more
- total order
- an ORDER BY whose keys tell every row apart, usually by ending with a unique key, so ties can't shuffle. read more
- transaction
- a group of statements that commit together or not at all. read more
- transaction id
- the 32-bit number a transaction gets at its first write. it goes into xmin and xmax of the tuples it touches. read more
- transaction pooling
- a pool mode that gives a client a server connection for one transaction only. scales well, and loses session state such as SET, SQL PREPARE and session advisory locks. read more
- transition table
- the old or new rows of a whole statement, handed to an AFTER statement trigger through REFERENCING. read more
- trigger
- a function the database runs automatically on INSERT, UPDATE, DELETE or TRUNCATE, before or after, per row or per statement. read more
- trigram
- a run of three characters. pg_trgm compares and indexes text by trigrams, for LIKE '%foo%' and similarity. read more
- TrueTime
- spanner's clock API: an interval guaranteed to contain the real time. commits wait out its width so timestamps follow real-time order. read more
- TRUNCATE
- empties a table by swapping in a new empty file: instant, no dead rows, but an ACCESS EXCLUSIVE lock and no WHERE. read more
- tsquery
- a full-text search condition over lexemes, with & | ! and <->, matched against a tsvector with @@. read more
- tsvector
- text as a sorted list of normalized words (lexemes) with their positions, for full-text search. read more
- tuple
- a row, in Codd's words: one value for each column of a relation. read more
- tuple header
- the 23 bytes at the start of every heap tuple: xmin, xmax, cid, ctid, two flag words and t_hoff. read more
- tuple version
- one physical copy of a row. an UPDATE writes a new one and leaves the old one on the page. read more
- two-phase commit
- atomic commit across databases: every participant prepares and votes, then all commit or all roll back. blocks if the coordinator dies after the votes. read more
- two-phase locking
- take locks, then release them, and never take a new one after releasing any. guarantees conflict serializability. read more
- type affinity
- sqlite's column type hint: values are converted if they can be and stored as given if not, unless the table is STRICT read more
u
- undo log
- where InnoDB and oracle keep old values after updating rows in place. readers rebuild old versions from it. read more
- UNION ALL
- both results, one after the other, duplicates kept. no hashing or sorting, so it's the cheap one. read more
- unknown
- the truth value of a comparison with NULL. WHERE drops it like false; CHECK lets it pass. postgres stores it as a NULL boolean. read more
- unknown literal
- a quoted string with no type yet. it takes the type the operator or column next to it wants, which is why '1' + 1 is 2. read more
- unlogged table
- a table that writes no WAL: faster to load, not replicated, and emptied after a crash. read more
- UPDATE
- changes columns in every row its WHERE matches. no WHERE matches every row, and the tag says how many. read more
- update anomaly
- the same fact stored in several rows, so an update to one copy leaves the others disagreeing. its siblings are the insert and delete anomalies. read more
- upsert
- insert a row, or update the one already there with that key. in postgres: INSERT ... ON CONFLICT DO UPDATE. read more
- usage count
- a counter from 0 to 5 on each buffer, raised by every pin and lowered by each pass of the clock hand. read more
- USING
- a join condition written as shared column names: USING (dept) means ON a.dept = b.dept, with dept output once. read more
- uuidv7
- a uuid whose first 48 bits are unix milliseconds, so new values sort last. postgres 18 generates them with uuidv7(). read more
v
- VACUUM
- the command that removes row versions nobody can see anymore and records the free space. read more
- VACUUM FULL
- rewrites a table and its indexes into new files, giving space back, under an ACCESS EXCLUSIVE lock. read more
- vectorized execution
- operators pass batches of a few thousand values instead of one row per call read more
- view
- a named query that stores no rows. the rewriter pastes it into every query that uses it. read more
- virtual xid
- the cheap id every transaction holds from its first statement: backend number / local counter. never written to disk. read more
- visibility check
- the fixed series of tests on a tuple's xmin, xmax, the commit log and a snapshot that decides if a reader sees that version. read more
- visibility map
- a fork with two bits per page, all-visible and all-frozen. vacuum and index-only scans use it to skip pages. read more
- volatility
- a function's promise: IMMUTABLE (same input, same output, forever), STABLE (within a statement) or VOLATILE. read more
w
- wait-for graph
- who waits for whom. a cycle of hard waits is a deadlock; a cycle through a queue position is fixed by reordering. read more
- WAL
- write-ahead log. every change is logged and flushed before the data pages are written. read more
- WAL archiving
- copying every finished WAL segment somewhere safe with archive_command, so a base backup can be rolled forward to any later moment. read more
- WAL record
- one entry in the WAL: a 24-byte header (length, xid, previous LSN, resource manager, CRC), block references, and the change. read more
- WINDOW clause
- names a window once (WINDOW w AS (...)) so several window functions can share it with OVER w. read more
- window frame
- the slice of the partition a window function reads for the current row. ROWS counts rows, RANGE measures values, GROUPS counts peer groups. read more
- window function
- a function computed over a set of related rows without collapsing them into one. read more
- WITH CHECK OPTION
- makes an updatable view refuse inserts and updates whose result it wouldn't show. read more
- WITH TIES
- a FETCH FIRST option that keeps going past n rows while they tie with the last one on the ORDER BY keys. read more
- work_mem
- the memory each sort or hash in a plan may use before it spills to disk. 4MB by default, per operation. read more
- working table
- in a recursive CTE, the rows the previous round found. the next round joins against these only; an empty one stops the loop. read more
- wraparound
- 32-bit transaction ids run round a circle; an unfrozen tuple more than 2 billion behind would look like the future. read more
- write amplification
- one logical write turning into many physical ones: the row, an entry per index, and WAL for each. read more
- write skew
- two transactions read the same rows, each writes a different row, and together they break a rule both checked. read more
- write-ahead rule
- a change's WAL record must reach disk before the data page it changes may. COMMIT only waits for the log. read more
x
- xmax
- the id of the transaction that deleted, updated or locked a tuple version. 0 if nobody has. read more
- xmin
- the id of the transaction that wrote a tuple version. a system column on every row. read more
- xmin horizon
- the oldest snapshot xmin or xid anything still holds. versions deleted after it can't be removed yet. read more