190+ PostgreSQL MCQ With Online Practice Test

PostgreSQL, often referred to as Postgres, is a powerful open-source relational database management system (RDBMS) known for its scalability, robustness, and extensibility. It offers advanced features like ACID compliance, support for complex data types, and support for both SQL and NoSQL data. PostgreSQL is highly regarded for its performance, security, and reliability, making it a popular choice for applications ranging from small startups to large enterprises. Its active developer community continuously enhances and maintains the software. PostgreSQL is an excellent choice for data storage, analysis, and management in various domains, including web applications, data warehousing, and geospatial applications.

Practice Test

101. What is the purpose of a "pg_dump" command in PostgreSQL?

Answer: To create a logical backup of a PostgreSQL database

102. What does a "pg_dumpall" command do in PostgreSQL backup?

Answer: It creates a backup of all PostgreSQL databases and roles

103. Which PostgreSQL command is used to back up a database cluster, including all databases and configuration files?

Answer: pg_basebackup

104. What is the purpose of a "pg_dump" with the "--format=c" option?

Answer: To create a custom-format backup file

105. What does a "pg_dump" with the "--file" option do in PostgreSQL backup?

Answer: Specifies the output file for the backup

106. What is the purpose of a "pg_restore" command in PostgreSQL?

Answer: To restore a database from a backup created with pg_dump

107. What does a "pg_restore" with the "--create" option do?

Answer: It creates a new database during the restore process

108. Which PostgreSQL command is used to perform a point-in-time recovery (PITR) from a continuous archive of WAL files?

Answer: pg_waldump

109. What is the purpose of a "pg_receivewal" command in PostgreSQL?

Answer: To stream Write-Ahead Logs (WAL) from a primary to a standby server

110. What is the primary goal of continuous archiving and point-in-time recovery (PITR) in PostgreSQL backup and restore?

Answer: To provide a way to recover the database to a specific point in time
Topic Tags