Re: TRUNCATE SERIALIZABLE and frozen COPY - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: TRUNCATE SERIALIZABLE and frozen COPY
Date
Msg-id CA+U5nM+GddEnXu1W6A0deJpRXr+vH63QpozjiN2NjxdRQVtvZw@mail.gmail.com
Whole thread Raw
In response to Re: TRUNCATE SERIALIZABLE and frozen COPY  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: TRUNCATE SERIALIZABLE and frozen COPY  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
On 8 November 2012 17:07, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Nov 7, 2012 at 10:34 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> For 9.2 we discussed having COPY setting tuples as frozen. Various
>> details apply.
>> Earlier threads:
>>   "RFC: Making TRUNCATE more "MVCC-safe"
>>   "COPY with hints, rebirth"
>>
>> I was unhappy with changing the behaviour of TRUNCATE, and still am.
>> So the proposal here is to have a specific modifier on TRUNCATE
>> command that makes it MVCC safe by throwing a serialization error.
>
> I don't think I understand the proposal.  Under what circumstances
> would it throw a serialization error?

If you ask for TRUNCATE SERIALIZABLE then if someone asks for data in
the table and has a snapshot that can see earlier data then it will
throw a serializable error. So its a new kind of TRUNCATE that is MVCC
safe.

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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Tweaking ResolveNew's API
Next
From: Dean Rasheed
Date:
Subject: Re: Proof of concept: auto updatable views [Review of Patch]