Re: insert performance

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Jinhua Luo <luajit(dot)io(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: insert performance
Date: 2016-01-10 21:05:52
Message-ID: 5692C7B0.3060002@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 1/9/16 11:57 PM, Jinhua Luo wrote:
> But I do not understand that why the process do so many IO with async
> commit? And it does not even happen at the shared buffer flushing and
> locks waiting. Where's the code path doing these IO?

I assume you're asking about all the IO to the heap table. That is most
likely occurring as part of ReadBuffer(). As soon as you fill up shared
buffers, BufferAlloc() is likely to end up with a dirty buffer,
resulting in it calling FlushBuffer() (see
src/backend/storage/buffer/bufmgr.c#1084).

Note that that call is tracked by
TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(), so I'd expect you to see it
in the relevant systemtap stats.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2016-01-11 19:20:03 Re: insert performance
Previous Message Jinhua Luo 2016-01-10 05:57:38 insert performance