Re: COPY with hints, rebirth - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: COPY with hints, rebirth
Date
Msg-id CA+U5nM+tu8E_rgG2-bhqWoGKhy7znQeH5WBJHfCsJRxT8LrH5g@mail.gmail.com
Whole thread Raw
In response to Re: COPY with hints, rebirth  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: COPY with hints, rebirth  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
On Sat, Feb 25, 2012 at 6:58 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Sat, Feb 25, 2012 at 6:24 PM, Kevin Grittner
> <Kevin.Grittner@wicourts.gov> wrote:
>> Simon Riggs <simon@2ndQuadrant.com> wrote:
>>
>>> This patch extends that and actually sets the tuple header flag as
>>> HEAP_XMIN_COMMITTED during the load.
>>
>> Fantastic!

> I think we could add that as an option on COPY, since "breaking MVCC"
> in that way is only a bad thing if it happens accidentally without the
> user's permission and knowledge - which they may wish to give in many
> cases, such as reloading a database from a dump.

I've coded up COPY FREEZE to do just that.

This version doesn't require any changes to transaction machinery.

But it is very effective at avoiding 4 out of the 5 writes you mention.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Rob Wultsch
Date:
Subject: Re: swapcache-style cache?
Next
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2