Re: How to implement the skip errors for copy from ?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: xbzhang <xbzhang(at)kingbase(dot)com(dot)cn>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to implement the skip errors for copy from ?
Date: 2014-06-17 08:40:46
Message-ID: CAA4eK1LJcgomEJYDPP1E-O=_gxdCWP3fVZRYmbrtuXv3_fKCaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 17, 2014 at 12:16 PM, xbzhang <xbzhang(at)kingbase(dot)com(dot)cn> wrote:
>
> one resource owner per tuples, when error happens, only release resource
owner belong to error tuple.
> Why some memory structures should be in undefined state? Can you give
some examples?

There might be some LWlocks which might have been taken
before error and you won't know which one to free. Another
is that postgres uses memory context to allocate/free memory
in most places, so there can be allocated memory which needs
to be released, transaction/sub-transaction abort takes care of all
such and many more similar things.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message xbzhang 2014-06-17 09:09:32 Re: How to implement the skip errors for copy from ?
Previous Message Michael Paquier 2014-06-17 08:06:55 Re: IMPORT FOREIGN SCHEMA statement