PostgreSQL Professional High Availability Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Questions: 20 | Updated: Aug 15, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What is logical replication used for in PostgreSQL?

Explanation

Logical replication lets PostgreSQL publish changes from selected tables and apply them to subscribed databases. It typically replicates data changes such as inserts, updates, and deletes, allowing specific tables to be synchronized without replicating the entire database or its raw WAL files.

Submit
Please wait...
About This Quiz
PostgreSQL Professional High Availability Quiz - Quiz

This quiz evaluates your understanding of PostgreSQL high availability concepts and strategies. It covers replication techniques, failover mechanisms, backup solutions, and clustering approaches essential for building resilient database systems. Ideal for database administrators and engineers preparing for production PostgreSQL deployments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. In PostgreSQL, which replication type requires a publication and subscription setup?

Explanation

Logical replication uses publications to define which tables and changes are shared, and subscriptions to receive those changes on another PostgreSQL server. This setup enables selective replication between databases.

Submit

3. What does the recovery_min_apply_delay parameter accomplish?

Explanation

`recovery_min_apply_delay` makes a standby wait for a specified interval before applying replicated transactions. This intentional lag provides time to respond to accidental changes—such as a mistaken deletion—before they take effect on the standby. It can increase replication lag and delay the availability of recent changes.

Submit

4. Which backup method provides the smallest backup size for large databases?

Explanation

Incremental physical backups store only the database blocks changed since the previous backup, rather than copying the entire database each time. For a large database with relatively few changes between backups, this can substantially reduce the amount of data stored. Restoring may require the base backup and a sequence of incremental backups.

Submit

5. In a failover scenario, what is 'split-brain' in PostgreSQL clustering?

Explanation

Split-brain occurs when a cluster loses reliable coordination and two nodes each believe they are the primary. Both may accept writes independently, creating conflicting data that is difficult to reconcile when connectivity is restored.

Submit

6. What is the purpose of the max_wal_senders parameter?

Explanation

`max_wal_senders` sets the maximum number of concurrent connections that can stream write-ahead log (WAL) data from a PostgreSQL server to replication standbys or WAL receivers. Increasing it may be necessary when adding more replicas or other WAL-streaming clients.

Submit

7. Which PostgreSQL extension provides distributed transactions across multiple nodes?

Submit

8. In PostgreSQL, what is a 'hot standby'?

Explanation

A hot standby is a PostgreSQL replica that replays changes from the primary server’s write-ahead log (WAL) while allowing read-only queries. This lets applications offload reporting and other reads from the primary. The standby does not accept writes, and its data may lag behind the primary during replication.

Submit

9. What does the wal_level parameter set to 'replica' enable?

Explanation

Setting `wal_level` to `replica` records enough information in the write-ahead log to support physical replication. This allows standby servers to receive WAL through streaming replication or retrieve archived WAL files for recovery and synchronization.

Submit

10. Which command initiates a base backup in PostgreSQL?

Explanation

`pg_basebackup` is PostgreSQL’s command-line utility for taking a base backup of a running database cluster. It connects to the server and copies the required data files, optionally including the write-ahead log (WAL), to create a consistent backup suitable for recovery or setting up a standby server.

Submit

11. Which PostgreSQL replication method provides the lowest latency for read-only replicas?

Explanation

Streaming replication continuously sends write-ahead log (WAL) records from the primary server to a standby over a network connection. This lets the standby apply changes with minimal delay and serve read-only queries close to real time. File-based log shipping and archive recovery typically depend on transferring and applying log files in batches, adding more latency.

Submit

12. Which parameter controls the number of standby servers that must acknowledge writes?

Explanation

`synchronous_standby_names` specifies which standby servers participate in synchronous replication and how many must acknowledge a write, using settings such as `FIRST` or `ANY` with a count. `synchronous_commit` controls when commits wait for acknowledgments, while `max_wal_senders` limits replication connections and `wal_level` determines the level of WAL information generated.

Submit

13. What is the maximum number of synchronous standbys that can acknowledge a transaction in PostgreSQL?

Explanation

PostgreSQL’s `synchronous_standby_names` setting determines how many synchronous standby servers must acknowledge a transaction. It can specify a number of standbys using priority-based (`FIRST`) or quorum-based (`ANY`) selection, along with the eligible standby names. Therefore, the number is configurable rather than fixed at one or two.

Submit

14. In a PostgreSQL cluster with Patroni, what is the role of the distributed consensus system?

Explanation

The distributed consensus system stores cluster coordination state, such as leader and membership information. Patroni uses it to coordinate failover and ensure a single PostgreSQL node is elected and managed as the primary.

Submit

15. What does Recovery Target Timeline (PITR) allow you to do?

Explanation

Point-in-time recovery (PITR) lets you restore a database to a chosen moment, typically before accidental data loss or corruption. It uses backups together with transaction logs to recreate the database state at that time.

Submit

16. Which PostgreSQL high availability solution uses virtual IP failover?

Explanation

Patroni uses etcd for distributed leader coordination and can promote a healthy PostgreSQL replica when the primary fails. In common high-availability deployments, a virtual IP is then moved to the new primary so clients can reconnect through the same address. Streaming replication alone, logical replication, and pg_dump do not provide this coordinated failover setup.

Submit

17. What is synchronous replication in PostgreSQL?

Explanation

In synchronous replication, the primary waits for acknowledgment from one or more standby servers before confirming a transaction’s commit. This helps ensure committed changes are available on the standby, improving data durability, though it can increase commit latency.

Submit

18. Which tool is commonly used for PostgreSQL backup automation and point-in-time recovery?

Explanation

pgBackRest is designed to automate PostgreSQL backups and support point-in-time recovery. It manages full, differential, and incremental backups, archives and restores write-ahead log (WAL) files, and can recover a database to a selected time or transaction. Its retention policies and parallel processing also help simplify backup management and improve efficiency.

Submit

19. In streaming replication, what does the standby server receive from the primary?

Explanation

In streaming replication, the primary continuously sends Write-Ahead Log (WAL) records to the standby. The standby replays these records to apply the primary’s changes and keep its data synchronized.

Submit

20. What is the primary purpose of WAL (Write-Ahead Logging) in PostgreSQL?

Explanation

WAL records database changes before they are written to the main data files. This allows PostgreSQL to replay committed changes after a crash, helping restore the database to a consistent state and ensuring durability.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is logical replication used for in PostgreSQL?
In PostgreSQL, which replication type requires a publication and...
What does the recovery_min_apply_delay parameter accomplish?
Which backup method provides the smallest backup size for large...
In a failover scenario, what is 'split-brain' in PostgreSQL...
What is the purpose of the max_wal_senders parameter?
Which PostgreSQL extension provides distributed transactions across...
In PostgreSQL, what is a 'hot standby'?
What does the wal_level parameter set to 'replica' enable?
Which command initiates a base backup in PostgreSQL?
Which PostgreSQL replication method provides the lowest latency for...
Which parameter controls the number of standby servers that must...
What is the maximum number of synchronous standbys that can...
In a PostgreSQL cluster with Patroni, what is the role of the...
What does Recovery Target Timeline (PITR) allow you to do?
Which PostgreSQL high availability solution uses virtual IP failover?
What is synchronous replication in PostgreSQL?
Which tool is commonly used for PostgreSQL backup automation and...
In streaming replication, what does the standby server receive from...
What is the primary purpose of WAL (Write-Ahead Logging) in...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!