




























































































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 PostgreSQL configuration parameter primarily determines the amount of memory used for caching table data? A) work_mem B) shared_buffers C) maintenance_work_mem D) effective_cache_size Answer: B Explanation: shared_buffers sets the size of the memory area PostgreSQL uses to cache data pages, directly affecting read performance. Question 2. In EPAS, which setting should be increased to allow the query planner to assume more cache is available for index scans? A) wal_buffers B) max_connections C) effective_cache_size D) checkpoint_timeout Answer: C Explanation: effective_cache_size is a planner hint about the OS cache size, influencing cost estimates for index scans and sequential scans. Question 3. What is the default cost of a sequential scan (seq_page_cost) in PostgreSQL’s planner?
Answer: C Explanation: The default seq_page_cost is 1.0, representing the planner’s estimated cost of reading a page sequentially. Question 4. Which autovacuum parameter controls the maximum amount of work a vacuum process can do before sleeping? A) autovacuum_vacuum_cost_delay B) autovacuum_max_workers C) autovacuum_naptime D) autovacuum_vacuum_scale_factor Answer: A Explanation: autovacuum_vacuum_cost_delay specifies the time to pause after reaching the cost limit, throttling vacuum activity. Question 5. To prioritize index scans over sequential scans for a specific table, which command can be used? A) SET enable_seqscan = off; B) ALTER TABLE … SET (seq_page_cost = 10);
Answer: C Explanation: pg_stat_all_indexes reports scans, tuples read, and other metrics for each index across the database. Question 8. Which index type is most suitable for full‑text search on large documents? A) B‑tree B) GIN C) GiST D) BRIN Answer: B Explanation: GIN indexes are optimized for searching array and full‑text search data, providing fast lookup for many values per row. Question 9. A partial index on a table’s “status” column with condition “status = 'active'” will be used when: A) The query filters on status = 'active' B) The query filters on status = 'inactive' C) The query selects all rows regardless of status D) The query uses an ORDER BY on status Answer: A
Explanation: Partial indexes are only applicable when the query’s WHERE clause matches the index’s predicate. Question 10. Which index type in EPAS is most efficient for range queries on a monotonically increasing timestamp column? A) GIN B) GiST C) BRIN D) Hash Answer: C Explanation: BRIN indexes store min/max values per block, making them ideal for large, ordered datasets with range predicates. Question 11. When using PgBouncer in transaction pooling mode, which of the following statements is true? A) Session‑level settings persist across transactions. B) Temporary tables survive across pooled connections. C) Prepared statements must be re‑prepared for each transaction. D) Autocommit is always disabled. Answer: C Explanation: In transaction pooling, each transaction may be executed on a different server connection, requiring re‑preparation of statements.
Question 14. Row‑Level Security (RLS) policies are defined using which command? A) CREATE POLICY B) ALTER ROLE C) GRANT SELECT ON TABLE D) SET SESSION AUTHORIZATION Answer: A Explanation: CREATE POLICY defines RLS policies that control row visibility for specific roles. Question 15. Which PostgreSQL extension provides detailed session and object‑level auditing? A) pg_stat_statements B) pgaudit C) pgcrypto D) pg_partman Answer: B Explanation: pgaudit records detailed audit logs of statements and object accesses, useful for compliance. Question 16. To enforce encrypted client‑server communication, which postgresql.conf parameter must be set to ‘on’? A) ssl = on
B) encryption = true C) ssl_cipher = 'AES' D) client_encryption = yes Answer: A Explanation: Setting ssl = on enables SSL/TLS for client connections. Question 17. Which file typically stores the server’s private key for SSL connections? A) postgresql.conf B) server.key C) pg_hba.conf D) pg_ident.conf Answer: B Explanation: The server’s private key is stored in a file (commonly server.key) referenced by ssl_key_file. Question 18. In EPAS, which view mimics Oracle’s ALL_TABLES dictionary view? A) pg_catalog.pg_tables B) information_schema.tables C) all_tables D) dba_tables
Explanation: EPAS supports PL/SQL compatibility, but the preferred migration target is PL/pgSQL, which closely matches PL/SQL constructs. Question 21. The EPAS Migration Toolkit primarily performs which of the following actions? A) Real‑time data replication from Oracle to EPAS B) Static analysis of Oracle schema and generation of equivalent EPAS objects C) Automatic conversion of Oracle stored procedures to PL/pgSQL at runtime D) Encryption of Oracle data before migration Answer: B Explanation: The Migration Toolkit analyses Oracle schemas and produces EPAS DDL/DML equivalents for migration. Question 22. Which parameter influences the number of cursors that can be opened simultaneously in EPAS? A) max_cursor_size B) max_prepared_transactions C) max_locks_per_transaction D) max_connections Answer: B Explanation: max_prepared_transactions limits the number of two‑phase commit prepared transactions, indirectly affecting open cursors in distributed environments.
Question 23. In a synchronous streaming replication setup, what happens if the standby does not acknowledge receipt of WAL within the timeout? A) The primary rolls back the transaction. B) The primary continues but logs a warning. C) The client receives an error and the transaction aborts. D) The standby automatically becomes primary. Answer: C Explanation: With synchronous_commit set to on, the client will see an error if the standby fails to confirm within the configured timeout. Question 24. What is the purpose of the “wal_keep_segments” parameter in replication? A) To limit the size of WAL archives. B) To retain a number of recent WAL files on the primary for standby catch‑up. C) To control the number of WAL files sent per second. D) To set the compression level of WAL files. Answer: B Explanation: wal_keep_segments ensures that a certain number of recent WAL segments are kept on the primary, allowing a standby that fell behind to catch up without needing archive restoration.
A) Write‑ahead logging B) Fencing (STONITH) C) Autovacuum D) pg_rewind Answer: B Explanation: Fencing (STeal‑Or‑Kill‑The‑Host) ensures that a failed primary is isolated, preventing two primaries from operating simultaneously. Question 28. To perform a point‑in‑time recovery (PITR) to a specific timestamp, which command sequence is required? A) pg_basebackup → pg_restore → pg_ctl restart B) pg_dump → pg_restore → pg_ctl start C) pg_basebackup → set recovery_target_time → pg_ctl start D) pg_dumpall → pg_ctl stop → pg_ctl start Answer: C Explanation: pg_basebackup creates a base backup; setting recovery_target_time in recovery.conf (or standby.signal) directs PostgreSQL to stop replay at the desired point. Question 29. Which parameter controls how often WAL files are archived? A) archive_timeout B) wal_sender_timeout
C) checkpoint_timeout D) wal_compression Answer: A Explanation: archive_timeout forces forced WAL segment switches for timely archiving, even if the segment is not full. Question 30. When using pgBackRest for backups, what does the “retain‑full” option specify? A) Number of full backups to keep before pruning. B) Number of incremental backups to retain. C) Minimum size of each backup. D) Frequency of full backups in days. Answer: A Explanation: retain-full defines how many full backup cycles are retained, allowing older backups to be pruned while preserving recent ones. Question 31. Declarative partitioning in EPAS can be implemented using which clause? A) PARTITION BY RANGE … B) SPLIT PARTITION … C) CREATE SUBTABLE … D) DISTRIBUTE BY HASH …
Explanation: pg_locks lists all locks held by active sessions, useful for diagnosing deadlocks and contention. Question 34. The pg_stat_statements extension primarily helps with: A) Auditing user logins B) Tracking execution statistics of SQL statements C) Managing database roles D) Automating vacuum operations Answer: B Explanation: pg_stat_statements records query text, execution counts, total time, and other metrics for performance analysis. Question 35. Which tool can be used to rebuild heavily bloated indexes without locking writes? A) REINDEX CONCURRENTLY B) VACUUM FULL C) pg_dumpall D) pg_upgrade Answer: A Explanation: REINDEX CONCURRENTLY rebuilds an index while allowing concurrent reads and writes, avoiding exclusive locks.
Question 36. The dblink extension is used for: A) Parallel query execution B) Connecting to remote PostgreSQL databases from within SQL C) Managing logical replication slots D) Encrypting data at rest Answer: B Explanation: dblink provides functions to open connections and execute queries on remote PostgreSQL instances. Question 37. Which of the following is NOT a valid method for loading large CSV files efficiently into EPAS? A) COPY FROM STDIN B) INSERT … VALUES (…) for each row C) \copy in psql D) pg_bulkload utility Answer: B Explanation: Using individual INSERT statements is inefficient for bulk loads; COPY, \copy, or specialized utilities are preferred. Question 38. In EPAS, which parameter determines the maximum size of a single row that can be stored? A) max_row_size
D) SELECT pg_create_logical_replication('mypub'); Answer: A Explanation: CREATE PUBLICATION defines a set of tables whose changes will be streamed to subscribers. Question 41. Which setting controls the maximum number of parallel workers a single query may launch? 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 the workers that a Gather node can spawn for a query. Question 42. In EPAS, the “log_min_duration_statement” parameter is used to: A) Log statements that exceed a certain execution time. B) Filter out statements based on their size. C) Set the minimum logging level for errors. D) Enable statement-level replication. Answer: A
Explanation: log_min_duration_statement logs the duration of each completed statement that runs longer than the specified threshold (in ms). Question 43. Which authentication method relies on the client presenting a Kerberos ticket? A) md B) scram-sha- 256 C) gss D) trust Answer: C Explanation: The “gss” method uses Kerberos (GSSAPI) tickets for authentication. Question 44. To enforce that a user can only connect from a specific IP address, which pg_hba.conf entry component is used? A) METHOD column B) DATABASE column C) ADDRESS column D) USER column Answer: C Explanation: The ADDRESS field specifies the client IP address or CIDR range allowed for the rule.