Set an appropriate memory allocation with maintenance_work_mem.
Set an appropriate memory allocation with shared_buffers.
Set an appropriate memory allocation with autovacuum_work_mem.
Restore the WAL file to a consistent state using pg_resetwal and start PostgreSQL.
Set an appropriate memory allocation with work_mem.
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2025/06/02
The correct answer is "B. Set an appropriate memory allocation with shared_buffers."
shared_buffers configures the amount of memory the database server uses for shared memory buffers. By default, it is set to 128MB. Setting shared_buffers to a value exceeding the server/OS's available memory can cause the server to crash. Ensure it is set to an appropriate value.
Each option is explained below.
A. Set an appropriate memory allocation with maintenance_work_mem.
Incorrect.
maintenance_work_mem specifies the maximum memory used by maintenance operations like VACUUM, CREATE INDEX, and ALTER TABLE ADD FOREIGN KEY. By default, it is set to 64MB.
B. Set an appropriate memory allocation with shared_buffers.
Correct.
C. Set an appropriate memory allocation with autovacuum_work_mem.
Incorrect.
autovacuum_work_mem specifies the maximum memory used by each autovacuum worker process.
D. Restore the WAL file to a consistent state using pg_resetwal and start PostgreSQL.
Incorrect.
pg_resetwal is a recovery tool used when the transaction log (WAL) is corrupted or lost.
E. Set an appropriate memory allocation with work_mem.
Incorrect.
work_mem configures the amount of memory allocated to each backend for operations like sorting and hashing before writing to temporary disk files.