




























































































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 command is used to initialize a new EPAS 11 database cluster? A) initdb B) createdb C) pg_start D) epas_init Answer: A Explanation: The initdb utility creates the data directory, writes configuration files, and sets up the initial system catalog for a PostgreSQL/EPAS cluster. Question 2. In EPAS, which process is responsible for writing dirty buffers to the operating system’s page cache? A) Checkpointer B) Writer C) WalWriter D) Autovacuum Answer: B Explanation: The background writer (often called “Writer”) periodically flushes dirty shared buffers to the OS cache to reduce checkpoint I/O spikes.
Question 3. Which configuration file defines client authentication methods such as password, Kerberos, or LDAP? A) postgresql.conf B) pg_hba.conf C) edb.conf D) pg_ident.conf Answer: B Explanation: pg_hba.conf (host‑based authentication) lists the allowed connection types and authentication methods for each client address range. Question 4. Setting shared_buffers to a high value primarily affects which resource? A) CPU utilization B) Disk space consumption C) Memory usage for cache D) Number of concurrent connections Answer: C Explanation: shared_buffers determines the amount of shared memory PostgreSQL uses to cache data pages, directly influencing memory consumption.
Question 7. Which of the following is an Oracle‑compatible data dictionary view provided by EPAS? A) pg_user B) dba_objects C) information_schema.tables D) pg_catalog.pg_class Answer: B Explanation: dba_objects is an Oracle‑style view that EPAS exposes when compatibility mode is enabled, mirroring Oracle’s data dictionary. Question 8. When creating a role that can log in but cannot create databases, which attribute should be omitted? A) LOGIN B) CREATEDB C) INHERIT D) SUPERUSER Answer: B Explanation: The CREATEDB attribute grants the ability to create new databases; omitting it prevents that privilege while still allowing login.
Question 9. Which pg_hba.conf authentication method uses the client’s operating‑system user name for verification? A) md B) trust C) ident D) scram-sha- 256 Answer: C Explanation: The ident method queries the operating system for the client’s user name and maps it to a database role. Question 10. To store large objects outside the main tablespace, which EPAS feature should be used? A) TOAST tables B) Tablespaces C) Foreign Data Wrappers D) Partitioning Answer: B Explanation: Tablespaces allow you to place individual database objects, including large tables or indexes, on separate file‑system locations.
Question 13. Which command creates a sequence that starts at 1000 and increments by 10? A) CREATE SEQUENCE my_seq START 1000 INCREMENT 10; B) CREATE SEQUENCE my_seq MINVALUE 1000 STEP 10; C) CREATE SEQUENCE my_seq WITH START 1000 STEP 10; D) CREATE SEQUENCE my_seq BEGIN 1000 NEXT 10; Answer: A Explanation: START sets the initial value and INCREMENT defines the step size for a PostgreSQL/EPAS sequence. Question 14. What does the VACUUM FULL command do that a regular VACUUM does not? A) Updates statistics for the planner B) Rewrites the entire table to reclaim space C) Locks the table for exclusive access D) Truncates all indexes Answer: B Explanation: VACUUM FULL performs a full rewrite of the table, physically returning unused space to the operating system, unlike regular VACUUM which only marks dead tuples.
Question 15. Which view provides the age (in transactions) of each database’s transaction ID counter? A) pg_stat_database B) pg_xact_status C) pg_control_checkpoint D) pg_stat_progress_vacuum Answer: A Explanation: pg_stat_database includes the column datfrozenxid and age(datfrozenxid) can be used to monitor transaction ID wraparound risk. Question 16. To enable continuous WAL archiving to /archive/wal, which postgresql.conf setting is required? A) archive_mode = on B) wal_level = hot_standby C) archive_command = 'cp %p /archive/wal/%f' D) Both A and C Answer: D
Answer: A Explanation: max_wal_senders sets the limit on concurrent WAL sender processes that stream WAL to standby servers. Question 19. What is the purpose of a replication slot in EPAS? A) To store a copy of the primary’s data files B) To prevent the primary from removing WAL files needed by a standby C) To encrypt WAL traffic between primary and standby D) To balance read queries across replicas Answer: B Explanation: Replication slots ensure the primary retains WAL segments until all connected standbys have consumed them, avoiding data loss. Question 20. Which command performs a manual failover to a standby server named standby1? A) SELECT pg_promote(); B) pg_ctl promote - D /var/lib/epas/standby1; C) barman switch-xlog --standby standby D) repmgr standby promote
Answer: B Explanation: pg_ctl promote (or pg_ctl - D <data_directory> promote) instructs a standby to become the primary, effecting a manual failover. Question 21. Which EPAS backup tool stores backups in a centralized catalog and supports incremental backups? A) pgBackRest B) BART (EDB Backup and Recovery Tool) C) pg_dumpall D) rsync Answer: B Explanation: BART is EDB’s enterprise backup solution that maintains a backup catalog, supports incremental and full backups, and integrates with EPAS. Question 22. When the planner estimates that an index scan will be cheaper than a sequential scan, which parameter influences that decision? A) random_page_cost B) seq_page_cost C) effective_io_concurrency D) All of the above
Answer: B Explanation: A GIN (Generalized Inverted Index) is optimized for fast lookups on composite values like tsvector used in full‑text search. Question 25. To increase the amount of memory available for sorting operations in a single query, which setting should be raised? A) shared_buffers B) work_mem C) maintenance_work_mem D) temp_buffers Answer: B Explanation: work_mem specifies the memory allocated for internal sort operations, hash tables, and other per‑operation structures. Question 26. Which parameter controls how often PostgreSQL forces a checkpoint based on elapsed time? A) checkpoint_timeout B) checkpoint_completion_target C) max_wal_size D) checkpoint_segments
Answer: A Explanation: checkpoint_timeout defines the maximum interval between checkpoints, regardless of WAL volume. Question 27. Which system view provides information about currently running queries and their state? A) pg_stat_user_tables B) pg_stat_activity C) pg_locks D) pg_stat_replication Answer: B Explanation: pg_stat_activity lists each backend’s PID, current query text, state (active, idle, etc.), and other session details. Question 28. Setting log_min_duration_statement to 0 results in what behavior? A) No statements are logged B) Only statements exceeding 0 ms are logged C) All statements are logged with their execution time D) Only statements that cause errors are logged
D) ALTER TABLE orders ADD TRIGGER trg_before_ins BEFORE INSERT; Answer: A Explanation: The syntax CREATE TRIGGER … BEFORE INSERT ON … FOR EACH ROW EXECUTE FUNCTION … defines a row‑level BEFORE INSERT trigger. Question 31. Which EPAS extension provides spatial data types and functions? A) pg_trgm B) hstore C) postgis D) citext Answer: C Explanation: postgis adds geometry, geography types, and a rich set of spatial functions to PostgreSQL/EPAS. Question 32. To enable PL/Python in EPAS, which command must be executed? A) CREATE EXTENSION plpython3u; B) LOAD 'plpython3'; C) ALTER DATABASE SET plpython3 = on;
D) ENABLE LANGUAGE plpython3; Answer: A Explanation: CREATE EXTENSION plpython3u; installs the untrusted PL/Python procedural language. Question 33. Which view shows the most frequently executed SQL statements across the cluster? A) pg_stat_user_functions B) pg_stat_statements C) pg_stat_activity D) pg_stat_database Answer: B Explanation: pg_stat_statements tracks execution statistics for all SQL statements, allowing identification of top‑cost queries. Question 34. In Oracle compatibility mode, which PL/SQL construct is supported for defining a package? A) CREATE OR REPLACE PACKAGE pkg_name AS … END; B) CREATE PACKAGE pkg_name; C) CREATE OR REPLACE PROCEDURE pkg_name;
D) Incremental backup of WAL files Answer: C Explanation: pg_dumpall creates a SQL script containing the schema and data of every database, plus global objects like roles and tablespaces. Question 37. Which command restores a logical backup created with pg_dump - Fc? A) pg_restore - d targetdb backup.dump B) psql - f backup.dump targetdb C) pg_load - d targetdb backup.dump D) pg_restore backup.dump Answer: A Explanation: pg_restore - d targetdb backup.dump reads the custom-format dump (-Fc) and restores it into the specified database. Question 38. In EPAS, which setting determines the maximum number of parallel workers for a query? A) max_parallel_workers_per_gather B) max_worker_processes C) parallel_leader_participation
D) max_parallel_workers Answer: A Explanation: max_parallel_workers_per_gather limits how many parallel workers a single gather node may launch for a query. Question 39. Which view provides information about the size of each table and its indexes? A) pg_relation_size() function only B) pg_stat_user_tables C) pg_total_relation_size() function D) pg_tablespace_size() Answer: C Explanation: The function pg_total_relation_size('schema.table') returns the combined size of a table, its TOAST data, and all associated indexes. Question 40. Which parameter controls how many WAL files are retained for standby servers that are not using replication slots? A) wal_keep_segments B) wal_keep_size C) max_wal_size