




























































































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. Which process is responsible for starting and managing all other server processes in EDB Postgres Advanced Server? A) autovacuum launcher B) postmaster C) background writer D) walwriter Answer: B Explanation: The postmaster (now called the postmaster or the server process) is the parent process that starts and monitors all backend processes. Question 2. In EDB Postgres Advanced Server, the write‑ahead log (WAL) is primarily used for: A) Storing user passwords securely B) Enabling point‑in‑time recovery C) Managing temporary tablespaces D) Caching query results Answer: B Explanation: WAL records every change before it is written to data files, allowing the database to be restored to any point in time. Question 3. Which isolation level guarantees that concurrent transactions produce the same result as if they were executed serially?
A) Read Committed B) Repeatable Read C) Serializable D) Read Uncommitted Answer: C Explanation: Serializable isolation ensures full serializability, preventing phenomena like phantom reads. Question 4. When creating a new database cluster with initdb, which directory stores the transaction log files? A) base/ B) pg_wal/ C) pg_tblspc/ D) pg_stat/ Answer: B Explanation: The pg_wal directory (formerly pg_xlog) holds WAL segment files. Question 5. Which postgresql.conf parameter controls the amount of memory used for shared buffers? A) work_mem B) maintenance_work_mem
Answer: D Explanation: scram-sha-256 provides stronger password hashing than MD5. Question 8. Which command-line utility is used to connect to an EDB Postgres Advanced Server database from the terminal? A) pgadmin B) psql C) pg_dump D) pg_basebackup Answer: B Explanation: psql is the interactive terminal client for PostgreSQL and EDB Advanced Server. Question 9. In a tablespace definition, which clause specifies the filesystem location for the tablespace? A) WITH (location) B) LOCATION C) PATH D) DIRECTORY Answer: B Explanation: The LOCATION clause defines the directory where the tablespace files reside.
Question 10. Which data type is best suited for storing hierarchical JSON documents? A) xml B) jsonb C) hstore D) text[] Answer: B Explanation: jsonb stores JSON in a binary format that supports indexing and efficient queries. Question 11. Declarative partitioning introduced in PostgreSQL 10 can be implemented using which clause? A) PARTITION BY RANGE B) DISTRIBUTE BY HASH C) SPLIT INTO D) CLUSTER BY Answer: A Explanation: PARTITION BY RANGE (or LIST) defines declarative partitions. Question 12. Which index type is most appropriate for full‑text search on a tsvector column?
C) ANALYZE table_name; D) CLUSTER table_name USING index_name; Answer: C Explanation: ANALYZE collects column statistics used by the query planner. Question 15. What is the purpose of the AUTOVACUUM daemon? A) Archive WAL files automatically B) Reclaim dead tuples and prevent bloat C) Perform periodic checkpointing D) Refresh materialized views Answer: B Explanation: AUTOVACUUM runs VACUUM and ANALYZE automatically to maintain table health. Question 16. Which view provides information about currently running queries and their execution times? A) pg_stat_user_tables B) pg_locks C) pg_stat_activity D) pg_stat_replication Answer: C
Explanation: pg_stat_activity shows each backend’s current query and state. Question 17. To grant SELECT privilege on all tables in a schema to a role, which command is correct? A) GRANT SELECT ON DATABASE schema_name TO role_name; B) GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO role_name; C) GRANT SELECT ON SCHEMA schema_name TO role_name; D) GRANT ALL PRIVILEGES ON SCHEMA schema_name TO role_name; Answer: B Explanation: The ON ALL TABLES IN SCHEMA clause applies the privilege to every table in the schema. Question 18. Which EDB feature adds row‑level security with Oracle‑compatible syntax? A) SQL/Protect B) Enhanced Auditing C) Extended RLS D) Secure Connect Answer: C Explanation: Extended Row‑Level Security (RLS) in EDB provides Oracle‑style policies for fine‑grained access control.
B) standby_mode C) recovery_target_time D) archive_command Answer: A Explanation: primary_conninfo supplies the connection string for the standby to reach the primary. Question 22. Which replication mode guarantees that a transaction is not considered committed on the primary until the standby has written it to WAL? A) Asynchronous B) Synchronous C) Logical D) Cascading Answer: B Explanation: Synchronous replication waits for acknowledgment from the standby before confirming commit. Question 23. Logical replication introduced in PostgreSQL 10 is best suited for: A) Replicating the entire cluster byte‑for‑byte B) Replicating selected tables or subsets of data C) Backing up WAL files to tape
D) Automating failover without external tools Answer: B Explanation: Logical replication streams changes at the logical level, allowing selective table replication. Question 24. Which EDB tool provides a graphical interface for monitoring server health, sessions, and performance metrics? A) pgAdmin B) EDB Enterprise Manager (PEM) C) pgBadger D) pgbouncer Answer: B Explanation: EDB Enterprise Manager offers comprehensive monitoring and administration features. Question 25. The edb_language PL/SQL extension allows: A) Running Java stored procedures B) Using Oracle‑compatible PL/SQL syntax in functions C) Automatic translation of Oracle packages to PostgreSQL objects D) Embedding Python code in triggers Answer: B
Question 28. Which command removes a role but only if it does not own any objects or have any privileges? A) DROP USER role_name; B) DROP ROLE role_name; C) REVOKE ALL FROM role_name; D) ALTER ROLE role_name NOLOGIN; Answer: B Explanation: DROP ROLE drops the role after checking that it has no owned objects or granted privileges. Question 29. The pg_stat_replication view on the primary shows: A) Disk usage of each tablespace B) Replication lag and state of each standby C) Active client connections D) Transaction IDs of committed transactions Answer: B Explanation: pg_stat_replication reports the status, lag, and other metrics of connected standbys. Question 30. Which setting controls the maximum number of WAL files that can be retained for standby servers? A) max_wal_senders
B) wal_keep_segments C) archive_timeout D) max_replication_slots Answer: B Explanation: wal_keep_segments (or wal_keep_size in newer versions) retains WAL files to support standbys that fall behind. Question 31. In EDB Postgres Advanced Server, the EXPLAIN ANALYZE command provides: A) Only the estimated cost of a query B) The actual execution time and row counts together with the plan C) A list of missing indexes D) A dump of the query’s source code Answer: B Explanation: EXPLAIN ANALYZE runs the query and shows both the planner’s estimates and real execution statistics. Question 32. Which function can be used to generate a universally unique identifier (UUID) in EDB? A) uuid_generate_v1() B) gen_random_uuid() C) uuid_create()
Answer: B Explanation: -Fc creates a custom-format dump that is compressed and can be restored selectively with pg_restore. Question 35. Which of the following is a valid reason to increase max_connections in postgresql.conf? A) To reduce checkpoint duration B) To allow more concurrent client sessions C) To increase the size of shared buffers D) To enable parallel query execution Answer: B Explanation: max_connections defines the maximum number of client connections the server will accept simultaneously. Question 36. In EDB, the SQL/Protect feature primarily defends against: A) Unauthorized file system access B) SQL injection attacks C) Buffer overflow in the server binary D) Data corruption due to power loss Answer: B Explanation: SQL/Protect provides mechanisms to detect and block SQL injection attempts.
Question 37. Which of the following statements about pg_basebackup is correct? A) It creates a logical dump of the database schema only. B) It copies the entire data directory for a physical backup. C) It can only be run on Windows platforms. D) It requires the database to be shut down. Answer: B Explanation: pg_basebackup performs a physical base backup by copying the data files while the server is online. Question 38. To enable row‑level security on a table, which command must be executed first? A) ALTER TABLE table_name ENABLE ROW LEVEL SECURITY; B) CREATE POLICY policy_name ON table_name USING (condition); C) ALTER TABLE table_name FORCE ROW LEVEL SECURITY; D) GRANT SELECT ON table_name TO PUBLIC; Answer: A Explanation: ENABLE ROW LEVEL SECURITY activates RLS on the table; policies can then be added. Question 39. Which built‑in function returns the current database name?
C) max_wal_size D) wal_buffers Answer: A Explanation: checkpoint_timeout sets the maximum duration the server will wait before issuing a checkpoint. Question 42. In EDB, which command creates a sequence that cycles after reaching its maximum value? A) CREATE SEQUENCE seq_name CYCLE; B) CREATE SEQUENCE seq_name NO CYCLE; C) ALTER SEQUENCE seq_name RESTART WITH 1; D) CREATE SEQUENCE seq_name INCREMENT BY 0; Answer: A Explanation: The CYCLE option allows the sequence to wrap around after hitting its limit. Question 43. Which view shows the size of each database in the cluster? A) pg_database_size() function only B) pg_stat_database C) pg_tablespace D) pg_shdepend
Answer: B Explanation: pg_stat_database includes a column databasesize (via pg_database_size) that reports each database’s size. Question 44. To force a standby server to become the primary without using an external tool, which file must be created? A) recovery.signal B) standby.signal C) promote.signal D) trigger_file Answer: D Explanation: Creating the trigger_file (as defined in recovery.conf/standby.signal) tells the standby to promote itself. Question 45. Which extension provides support for spatial data types and functions? A) postgis B) pgcrypto C) hstore D) citext Answer: A