MVCC, WAL & pgvector

Preview — 3 of 10 questions

In PostgreSQL's MVCC model, what do the hidden xmin and xmax columns represent?

Axmin is the transaction ID (XID) that inserted the row; xmax is the XID that deleted or updated the row (0 means the row is live)
Bxmin is the row's primary key hash; xmax is a checksum for data integrity
Cxmin and xmax are the minimum and maximum values of the indexed column
DThey store the creation and expiration timestamps of the row

When is wal_level = logical strictly required vs wal_level = replica?

Alogical is required for all replication; replica is only for backups
Blogical reduces WAL size; use it to improve performance
Creplica is sufficient for streaming physical replication and pg_basebackup; logical is required for logical replication (CREATE SUBSCRIPTION), logical decoding, and CDC tools like Debezium or pgoutput
DBoth settings are identical in PostgreSQL 15+

What is the role of hot_standby = on in a PostgreSQL streaming replication setup?

AIt enables the standby to accept write transactions
BIt allows the standby server to serve read-only queries while simultaneously replaying WAL from the primary
CIt speeds up WAL application on the standby by using parallel workers
DIt enables the standby to automatically promote itself without manual intervention

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.