Re: TRUNCATE SERIALIZABLE and frozen COPY

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)mail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TRUNCATE SERIALIZABLE and frozen COPY
Date: 2012-11-09 15:24:09
Message-ID: CAHyXU0zJTz1eL=vp3dvKUFCnACON_b-ufSX1RSQR00ufHObfsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 9, 2012 at 8:22 AM, Kevin Grittner <kgrittn(at)mail(dot)com> wrote:
> Robert Haas wrote:
>
>> What I've been wondering since this last came up is whether we
>> could use some variant of the SIREAD locks Kevin introduced for SSI
>> to handle this case - essentially have the transaction doing the
>> TRUNCATE make an entry in the lock table that will force a
>> serialization failure for any backend which accesses the table with
>> a snapshot that can't see the truncating transaction's XID.
>
> It seems to me that the goal would be to make this semantically
> idential to the behavior users would see if an unqualified DELETE
> were run against the table rather than a TRUNCATE. To wit:

but, triggers would not fire, right?

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2012-11-09 15:34:06 Re: TRUNCATE SERIALIZABLE and frozen COPY
Previous Message Simon Riggs 2012-11-09 15:18:29 Re: TRUNCATE SERIALIZABLE and frozen COPY