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

From: xbzhang <xbzhang(at)kingbase(dot)com(dot)cn>
To: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
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 09:09:32
Message-ID: 2014061717093157661367@kingbase.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)kingbase(dot)com(dot)cn
 From: Amit KapilaDate: 2014-06-17 17:10To: xbzhangCC: Pavel Stehule; Alvaro Herrera; pgsql-hackersSubject: Re: [HACKERS] How to implement the skip errors for copy from ?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 takenbefore error and you won't know which one to free.  Another
is that postgres uses memory context to allocate/free memoryin most places, so there can be allocated memory which needsto 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2014-06-17 09:22:17 Re: UPDATE SET (a,b,c) = (SELECT ...) versus rules
Previous Message Amit Kapila 2014-06-17 08:40:46 Re: How to implement the skip errors for copy from ?