Skip site navigation (1) Skip section navigation (2)

Re: COPY with hints, rebirth

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY with hints, rebirth
Date: 2012-02-29 16:14:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Feb 25, 2012 at 6:58 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Sat, Feb 25, 2012 at 6:24 PM, Kevin Grittner
> <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>> Simon Riggs <simon(at)2ndQuadrant(dot)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         
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment: copy_freeze.v1.patch
Description: text/x-diff (8.3 KB)

In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2012-02-29 16:24:21
Subject: Re: 16-bit page checksums for 9.2
Previous:From: Rob WultschDate: 2012-02-29 15:56:10
Subject: Re: swapcache-style cache?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group