Re: LIMIT for UPDATE and DELETE

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: 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-08-29 10:20:31
Message-ID: 540053EF.9090708@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/08/25 15:48), Etsuro Fujita wrote:
> (2014/08/15 6:18), Rukh Meski wrote:
>> Based on the feedback on my previous patch, I've separated only the
>> LIMIT part into its own feature. This version plays nicely with
>> inheritance. The intended use is splitting up big UPDATEs and DELETEs
>> into batches more easily and efficiently.
>
> Before looking into the patch, I'd like to know the use cases in more
> details.

Thanks for the input, Amit, Kevin and Jeff! I understand that the patch
is useful.

I've looked at the patch a bit closely. Here is my initial thought
about the patch.

The patch places limit-counting inside ModifyTable, and works well for
inheritance trees, but I'm not sure that that is the right way to go. I
think that this feature should be implemented in the way that we can
naturally extend it to the ORDER-BY-LIMIT case in future. But honestly
the patch doesn't seem to take into account that, I might be missing
something, though. What plan do you have for the future extensibility?

I think that the approach discussed in [1] would be promissing, so ISTM
that it would be better to implement this feature by allowing for plans
in the form of eg, ModifyTModifyTable+Limit+Append.

Thanks,

[1] http://www.postgresql.org/message-id/26819.1291133045@sss.pgh.pa.us

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-08-29 11:34:38 Re: pgbench throttling latency limit
Previous Message Heikki Linnakangas 2014-08-29 09:56:50 Re: pgbench throttling latency limit