| From: | amul sul <sulamul(at)gmail(dot)com> |
|---|---|
| To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key |
| Date: | 2018-04-06 08:49:02 |
| Message-ID: | CAAJ_b94X5Y_zdTN=BGdZie+hM4p6qW70-XCJhFYaCUO0OfF=aQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Apr 6, 2018 at 1:19 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Fri, Apr 6, 2018 at 12:50 PM, amul sul <sulamul(at)gmail(dot)com> wrote:
>>
>> Updated patch attached.
>>
>
> + if (ItemPointerIndicatesMovedPartitions(&hufd.ctid))
> + ereport(ERROR,
> + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> + errmsg("tuple to be locked was already moved to another partition
> due to concurrent update")));
>
> As suggested by Andres, I think you should change the error code to
> serialization failure i.e ERRCODE_T_R_SERIALIZATION_FAILURE.
>
Thanks for the reminder -- fixed in the attached version.
Regards,
Amul
| Attachment | Content-Type | Size |
|---|---|---|
| v10-0001-Raise-error-when-affecting-tuple-moved-int.patch | application/octet-stream | 41.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2018-04-06 08:51:46 | Re: Get the name of the target Relation from Query struct? |
| Previous Message | Ernst-Georg Schmid | 2018-04-06 08:38:46 | AW: Get the name of the target Relation from Query struct? |