Re: VLDB Features

From: NikhilS <nikkhils(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Neil Conway" <neilc(at)samurai(dot)com>, "Hannu Krosing" <hannu(at)skype(dot)net>, "Josh Berkus" <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: VLDB Features
Date: 2007-12-17 07:35:35
Message-ID: d3c4af540712162335nb2c2310pa045fd5c58a20b84@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Dec 15, 2007 1:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> NikhilS <nikkhils(at)gmail(dot)com> writes:
> > Any errors which occur before doing the heap_insert should not require
> > any recovery according to me.
>
> A sufficient (though far from all-encompassing) rejoinder to that is
> "triggers and CHECK constraints can do anything".
>
> > The overhead of having a subtransaction per row is a very valid concern.
> But
> > instead of using a per insert or a batch insert substraction, I am
> > thinking that we can start off a subtraction and continue it till we
> > encounter a failure.The moment an error is encountered, since we have
> the offending >(already in heap) tuple around, we can call a
> simple_heap_delete on the same and commit >(instead of aborting) this
> subtransaction
>
> What of failures that occur only at (sub)transaction commit, such as
> foreign key checks?
>

What if we identify and define a subset where we could do subtransactions
based COPY? The following could be supported:

* A subset of triggers and CHECK constraints which do not move the tuple
around. (Identifying this subset might be an issue though?)
* Primary/unique key indexes

As Hannu mentioned elsewhere in this thread, there should not be very many
instances of complex triggers/CHECKs around? And may be in those instances
(and also the foreign key checks case), the behaviour could default to use a
per-subtransaction-per-row or even the existing single transaction model?

Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2007-12-17 07:40:48 Proposal for Null Bitmap Optimization(for Trailing NULLs)
Previous Message Gokulakannan Somasundaram 2007-12-17 07:28:33 Re: EXPLAIN ANALYZE printing logical and hardware I/O per-node