Re: LIMIT for UPDATE and DELETE

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Marko Tiikkaja <marko(at)joh(dot)to>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Rukh Meski <rukh(dot)meski(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LIMIT for UPDATE and DELETE
Date: 2014-09-10 10:05:25
Message-ID: 54102265.9040105@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/09/10 18:33), Marko Tiikkaja wrote:
> On 9/10/14 11:25 AM, Etsuro Fujita wrote:
>> The reason is because I think that after implementing #2, we should
>> re-implement this feature by extending the planner to produce a plan
>> tree such as ModifyTable+Limit+Append, maybe with LockRows below the
>> Limit node. Such an approach would prevent duplication of the LIMIT
>> code in ModifyTable, making the ModifyTable code more simple, I think.

> You can already change *this patch* to do ModifyTable <- Limit <-
> LockRows. If we think that's what we want, we should rewrite this patch
> right now.

I think it might be relatively easy to do that for single-table cases,
but for inheritance cases, inheritance_planner needs work and I'm not
sure how much work it would take ...

> Like I said upthread, I think LockRows is a bad idea, but I'll need to
> run some performance tests first. But whichever method we decide to
> implement for this patch shouldn't need to be touched when the changes
> to UPDATE land, so your reasoning is incorrect.

Yeah, as you say, we need the performance tests, and I think it would
depend on those results whether LockRows is a bad idea or not.

Thanks,

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2014-09-10 10:18:41 Re: LIMIT for UPDATE and DELETE
Previous Message Fujii Masao 2014-09-10 09:55:13 Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index