Re: How to implement the skip errors for copy from ? - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: How to implement the skip errors for copy from ?
Date
Msg-id CAA4eK1LJcgomEJYDPP1E-O=_gxdCWP3fVZRYmbrtuXv3_fKCaA@mail.gmail.com
Whole thread Raw
In response to Re: How to implement the skip errors for copy from ?  (xbzhang <xbzhang@kingbase.com.cn>)
List pgsql-hackers
On Tue, Jun 17, 2014 at 12:16 PM, xbzhang <xbzhang@kingbase.com.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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: IMPORT FOREIGN SCHEMA statement
Next
From: xbzhang
Date:
Subject: Re: How to implement the skip errors for copy from ?