Re: BufferAccessStrategy for bulk insert - Mailing list pgsql-hackers

From Robert Haas
Subject Re: BufferAccessStrategy for bulk insert
Date
Msg-id 603c8f070811011023n202aea33w4da13b7d14f74134@mail.gmail.com
Whole thread Raw
In response to Re: BufferAccessStrategy for bulk insert  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: BufferAccessStrategy for bulk insert  (Simon Riggs <simon@2ndQuadrant.com>)
Re: BufferAccessStrategy for bulk insert  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Can you test whether using the buffer access strategy is a win or a
> loss? Most of that gain is probably coming from the reduction in
> pinning.

Patch resnapped to HEAD, with straightforward adjustments to
compensate for Heikki's changes to the ReadBuffer interface.  See
attached.

New testing results, now with and without BAS:

--TRUNK--
Time: 17945.523 ms
Time: 18682.172 ms
Time: 17047.841 ms
Time: 16344.442 ms
Time: 18727.417 ms

--PATCHED--
Time: 13323.772 ms
Time: 13869.724 ms
Time: 14043.666 ms
Time: 13934.132 ms
Time: 13193.702 ms

--PATCHED with BAS disabled--
Time: 14460.432 ms
Time: 14745.206 ms
Time: 14345.973 ms
Time: 14601.448 ms
Time: 16535.167 ms

I'm not sure why the BAS seemed to be slowing things down before.
Maybe it's different if we're copying into a pre-existing table, so
that WAL is enabled?  Or it could have just been a fluke - the numbers
were close.  I'll try to run some additional tests if time permits.

...Robert

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Hot Standby (commit fest version - v5)
Next
From: Simon Riggs
Date:
Subject: Re: BufferAccessStrategy for bulk insert