0

According to the official PostgreSQL documentation:

shared_buffers (integer)

Sets the amount of memory the database server uses for shared memory buffers. The default is typically 128 megabytes (128MB), but might be less if your kernel settings will not support it (as determined during initdb). This setting must be at least 128 kilobytes. (Non-default values of BLCKSZ change the minimum.) However, settings significantly higher than the minimum are usually needed for good performance. This parameter can only be set at server start.

Is anyone aware of any way of increasing this parameter without restarting the process or (if you have to) without affecting an app that is making a bunch of batched UPDATE/DELETEs on the database?

  • 2
    No, not possible. There is no way around a restart. – a_horse_with_no_name Jul 14 at 7:31
  • Not even by tinkering with Linux internals? Or is there a way to make sure the app won't notice it? (The app is running all these batches in a single transaction unfortunately) – XCore Jul 14 at 15:23
  • No, not possible. But the shared_buffers has absolutely nothing to do with the performance of large transactions. Actually large transactions don't really require more memory than small transactions. What exactly are you trying to achieve with that? – a_horse_with_no_name Jul 14 at 15:29
  • Increasing shared_buffers will not improve DELETE or UPDATE performance – a_horse_with_no_name Jul 14 at 15:44
  • What do you think would? Doesn't look IO constrained 🤔 – XCore Jul 14 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.