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

From xbzhang
Subject Re: How to implement the skip errors for copy from ?
Date
Msg-id 2014061717093157661367@kingbase.com.cn
Whole thread Raw
In response to How to implement the skip errors for copy from ?  (xbzhang <xbzhang@kingbase.com.cn>)
Responses Re: How to implement the skip errors for copy from ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
LWlocks can record in resource owner per tuples, so they can be released 
at rigth way, but the memory allocated on memory context is one problem.
Are there any others problems?


张晓博   研发二部

北京人大金仓信息技术股份有限公司

地址:北京市海淀区上地西路八号院上地科技大厦4号楼501

邮编:100085

电话:(010) 5885 1118 - 8450

手机:15311394463

邮箱:xbzhang@kingbase.com.cn

 
Date: 2014-06-17 17:10
To: xbzhang
Subject: Re: [HACKERS] How to implement the skip errors for copy from ?
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

在此邮件中未发现病毒。
检查工具:AVG - www.avg.com
版本:2013.0.3480 / 病毒数据库:3955/7689 - 发布日期:06/16/14

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: How to implement the skip errors for copy from ?
Next
From: Vik Fearing
Date:
Subject: Re: UPDATE SET (a,b,c) = (SELECT ...) versus rules