pg_restore and shared_buffers

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: pg_restore and shared_buffers
Date: 2024-01-08 20:22:51
Message-ID: CANzqJaBMccmJn8_GiOcDEZ3xrZNG=8ta_L87C83xU7-_VLR1iA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

(PG14.10, restoring a pg_dump created from a PG 9.6.24 instance. Restores
take about 10 hours, so testing must be more thoughtful than
see-what-works.)

This 9 year old blog post from Josh Berkus recommends setting
shared_buffers to 1/2 its normal value.
https://www.databasesoup.com/2014/09/settings-for-fast-pgrestore.html

My normal shared_buffers setting is 32GB (on a 132GB VM), so dropped it
down to 16GB (with 1GB mainteance_work_mem). Swap usage is still slowly
creeping up during the COPY phase, while using --jobs=24.

I'm wondering if 16GB is still too high, since the threads don't share
anything. (Or do they???)

Any benefit in dropping shared_buffers as low as 4GB?

Browse pgsql-admin by date

  From Date Subject
Next Message Rakesh Nashine 2024-01-09 11:59:51 Re: Ingress to PostgreSQL Migration
Previous Message Rambabu V 2024-01-08 17:26:31 Re: Db nodes are getting deregistering from consul