Re: Improving PostgreSQL insert performance

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Frits Jalvingh <jal(at)etc(dot)to>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Improving PostgreSQL insert performance
Date: 2017-06-09 17:07:07
Message-ID: CAMkU=1zzG8iKP8eao_YEyB4Q2rimuEEwZO1n+TQd4PCk01FZMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jun 9, 2017 at 6:04 AM, Frits Jalvingh <jal(at)etc(dot)to> wrote:

>
> I already changed the following config parameters:
> work_mem 512MB
> synchronous_commit off
>

Since you are already batching up commits into large chunks, this setting
is not very useful, but does risk you losing supposedly-committed data upon
a crash. I would not do it.

> shared_buffers 512mb
>

You might try increasing wal_buffers, but the default for this size of
shared_buffers is 16MB, which is usually big enough.

One thing you are missing is max_wal_size. The default value of that is
probably too small for what you are doing.

But if you are not using COPY, then maybe none of this matters as the
bottleneck will be elsewhere.

Cheers,

Jeff

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Vladimir Sitnikov 2017-06-09 22:08:34 Re: Improving PostgreSQL insert performance
Previous Message Frits Jalvingh 2017-06-09 15:37:10 Re: Improving PostgreSQL insert performance