




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What is the primary purpose of the WAL (Write-Ahead Log) in PostgreSQL? A) To cache frequently accessed rows in memory B) To store statistics for the query planner C) To ensure durability by recording changes before they are applied to data files D) To manage user authentication tokens Answer: C Explanation: WAL records every modification before it is written to the data files, guaranteeing that committed transactions can be recovered after a crash.
Question 2. Which background process is responsible for flushing dirty buffers to disk in PostgreSQL? A) Autovacuum launcher B) WAL writer C) Checkpointer D) Stats collector Answer: C Explanation: The checkpointer periodically writes dirty shared buffers to the data files, reducing recovery time after a crash.
Question 3. In EDB Postgres Advanced Server (EPAS), which feature provides Oracle-compatible PL/SQL packages? A) EDB-FDW B) SPL (Server Programming Language) C) pg_hint_plan D) pg_partman Answer: B Explanation: SPL implements PL/SQL-like stored procedures, packages, and functions, enabling Oracle-style development on EPAS.
Question 4. Which system catalog stores information about tables, columns, and indexes in PostgreSQL? A) pg_database B) pg_class C) pg_authid D) pg_tablespace Answer: B Explanation: pg_class contains one row per relation (table, index, sequence, etc.) and is joined with pg_attribute for column details.
A) Disables WAL archiving B) Allows transactions to be considered committed before WAL is flushed to disk C) Forces all commits to wait for a standby to acknowledge receipt D) Increases the size of the WAL segment Answer: B Explanation: Setting synchronous_commit to off reduces latency by not waiting for WAL to be flushed, at the cost of potential data loss on crash.
Question 8. Which index type is most suitable for full-text search on a column containing large documents? A) B-Tree B) GIN C) Hash D) BRIN Answer: B Explanation: GIN indexes efficiently handle many-to-many relationships such as the lexemes generated by full-text search.
Question 9. When EXPLAIN ANALYZE shows a “Hash Join” with a large “Hash Batches” value, what is the most likely cause? A) Insufficient work_mem causing the hash table to spill to disk
B) Corrupted statistics leading to poor plan choice C) Use of a non-indexed foreign key D) Presence of a materialized view Answer: A Explanation: If work_mem is too low, the hash table cannot fit in memory and PostgreSQL creates multiple batches, degrading performance.
Question 10. Which join algorithm is preferred when the outer relation is small and the inner relation is indexed on the join key? A) Nested Loop B) Merge Join C) Hash Join D) Cross Join Answer: A Explanation: Nested Loop can efficiently probe the indexed inner relation for each row of the small outer relation.
Question 11. In pgbench, which parameter controls the number of concurrent client connections used during the benchmark? A) -t (transactions) B) -c (clients)
Answer: C Explanation: RelationLock appears when a process waits for an exclusive or share lock on a table.
Question 14. In streaming replication, what is the effect of setting “synchronous_standby_names = ‘’”?* A) No standby will ever be synchronous B) All connected standbys become synchronous for each commit C) Only the first standby listed becomes synchronous D) Replication switches to logical mode Answer: B Explanation: The asterisk means any standby that is currently connected will be considered synchronous.
Question 15. Which of the following is a requirement for using logical replication in PostgreSQL? A) Physical WAL archiving must be disabled B) The publisher must have a primary key on each replicated table C) All tables must be in the same tablespace D) The database must be in recovery mode
Answer: B Explanation: Logical replication needs a replica identity, usually a primary key, to identify rows for UPDATE/DELETE.
Question 16. What does the “pg_replication_slots” catalog track? A) Active background writer processes B) Names of tablespaces used for replication C) Slots that retain WAL for downstream subscribers D) Users with replication privileges Answer: C Explanation: Replication slots prevent WAL removal until all downstream consumers have received the needed data.
Question 17. Which tool provides automated failover and monitoring for EDB clusters? A) pgBouncer B) EDB Failover Manager (EFM) C) Barman D) pgBackRest Answer: B
Explanation: The krb5 authentication method validates the user against a Kerberos KDC using tickets.
Question 20. When configuring LDAP authentication, which PostgreSQL parameter specifies the LDAP server’s URL? A) ldapserver B) ldap_uri C) host D) binddn Answer: A Explanation: The ldapserver parameter defines the host (or hosts) of the LDAP directory for authentication.
Question 21. Which role attribute allows a role to inherit privileges from roles it is a member of? A) SUPERUSER B) INHERIT C) BYPASSRLS D) LOGIN Answer: B Explanation: The INHERIT attribute determines whether a role automatically receives privileges of its member roles.
Question 22. What does the “pg_audit” extension primarily capture? A) Physical disk I/O statistics B) Detailed DDL/DML statements for compliance auditing C) Query execution times for performance tuning D) Network traffic between client and server Answer: B Explanation: pg_audit logs statements and session information to help satisfy regulatory audit requirements.
Question 23. **Data redaction in EPAS can be achieved using which feature? ** A) Row-level security (RLS) policies with column masking functions B) Transparent data encryption (TDE) only C) pgcrypto’s encrypt/decrypt functions on the client side D) Disabling SELECT privileges on sensitive columns Answer: A Explanation: RLS policies combined with custom functions can mask or replace column values for unauthorized users.
Question 26. Which autovacuum parameter controls the threshold of dead tuples before a vacuum is triggered on a table? A) autovacuum_naptime B) autovacuum_vacuum_threshold C) autovacuum_max_workers D) autovacuum_freeze_max_age Answer: B Explanation: autovacuum_vacuum_threshold defines the baseline number of dead tuples that must exist before vacuum runs.
Question 27. What is the purpose of “vacuum freeze” in PostgreSQL? A) To compact table storage and reclaim space B) To prevent transaction ID wraparound by marking tuples as frozen C) To reset the statistics collector D) To archive old WAL files Answer: B Explanation: Vacuum freeze marks tuples with a special XID so they are no longer considered for wraparound checks, protecting data integrity.
Question 28. Which tablespace attribute can be used to place a specific table on a high-performance SSD?
A) tablespace_location B) tablespace_name C) tablespace_owner D) tablespace_priority Answer: A Explanation: The location of a tablespace determines the underlying filesystem path, allowing administrators to place objects on desired storage media.
Question 29. During a major version upgrade, which tool automates the migration of data while preserving logical objects? A) pg_dump/pg_restore B) pg_upgrade C) Barman D) EDB Migration Toolkit (MTK) Answer: D Explanation: MTK provides a guided migration path from Oracle or older PostgreSQL versions, handling schema conversion and data load.
Question 30. What does the “pgBackRest” option “type = full” specify? A) Only WAL files are backed up
C) csvlog D) jsonlog Answer: C Explanation: Setting log_destination = 'csvlog' produces logs in a comma-separated format suitable for parsing.
Question 33. What is the effect of setting “archive_mode = on” together with “archive_command”? A) Disables WAL archiving B) Enables continuous archiving of completed WAL segments to a safe location C) Forces the server to stop after each checkpoint D) Streams WAL to a standby without archiving Answer: B Explanation: archive_mode activates the archiver process, which runs archive_command for each completed WAL segment.
Question 34. Which command restores a point-in-time recovery using a base backup and archived WAL files? A) pg_dumpall B) pg_restore C) pg_basebackup
D) recovery.conf (or standby.signal with recovery parameters) Answer: D Explanation: Configuring recovery.conf (or the modern standby.signal file) with restore_command and recovery_target_time enables PITR.
Question 35. When using Barman for backup, what does the “barman check” command verify? A) Network latency between primary and standby B) Consistency of the backup catalog and required configuration settings C) Query execution plans for long-running queries D) Disk fragmentation on the backup storage Answer: B Explanation: barman check validates that the server is correctly configured for backup and that all prerequisites are met.
Question 36. Which PostgreSQL feature allows “row-level security” to filter rows based on the current user? A) Column privileges B) RLS policies (CREATE POLICY) C) Tablespace quotas D) Event triggers
Answer: A Explanation: wal_keep_segments (or wal_keep_size in newer versions) ensures enough WAL is kept so replicas with slots can catch up.
Question 39. What does the “pg_stat_replication” view display? A) Statistics about background writer activity B) Information about connected standby servers, including lag and sync state C) List of all active prepared transactions D) Disk usage per tablespace Answer: B Explanation: pg_stat_replication shows replication status for each standby, including write, flush, and replay LSNs.
Question 40. **Which of the following is a valid reason to use a “BRIN” index? ** A) The table has a large number of distinct values in the indexed column B) The table is small and fits entirely in memory C) The column values are naturally ordered and the table is very large D) Full-text search is required on a text column Answer: C
Explanation: BRIN indexes store summary ranges and are efficient for very large tables with naturally ordered data.
Question 41. When a query plan shows “Seq Scan” on a large table, which action is most likely to improve performance? A) Increase work_mem B) Create an appropriate index on the filter column C) Disable autovacuum D) Set synchronous_commit to off Answer: B Explanation: A sequential scan indicates no usable index; adding an index can allow an index scan instead.
Question 42. What is the effect of setting “max_parallel_workers_per_gather = 0”? A) Disables parallel query execution for gather nodes B) Forces all queries to use maximum parallelism C) Limits the number of background writer processes D) Increases the size of shared_buffers Answer: A Explanation: Setting the parameter to zero tells PostgreSQL not to launch parallel workers for gather nodes.