Re: [pgadmin-hackers] Feature request: limited deletions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: Ian Barwick <barwick(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgadmin-hackers] Feature request: limited deletions
Date: 2010-04-08 11:45:02
Message-ID: o2i603c8f071004080445w8971602br895805b5cbfbb44f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-hackers

On Thu, Apr 8, 2010 at 7:05 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> On 8 April 2010 11:55, Ian Barwick <barwick(at)gmail(dot)com> wrote:
>>
>> 2010/4/8 Thom Brown <thombrown(at)gmail(dot)com>:
>> > I couldn't find any discussion on this, but the request is quite
>> > straightforward.  Implement a LIMIT on DELETE statements like SELECT
>> > statements.
>> >
>> > So you could write:
>> >
>> > DELETE FROM massive_table WHERE id < 40000000 LIMIT 10000;
>> >
>> > This would allow deletions in smaller batches rather than waiting
>> > potentially hours for the server to mark all those rows as deleted and
>> > commit it as one massive transaction.
>>
>> Is this a PgAdmin-specific question? If it is, apologies I am missing
>> the context.
>>
>> If not, this is totally the wrong list, but why not use a subquery to
>> control what is deleted?
>
> Erm... my mistake, I thought this was on the generic hackers list.  Moving
> it over in this reply.

I've certainly worked around the lack of this syntax more than once.
And I bet it's not even that hard to implement.

...Robert

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Csaba Nagy 2010-04-08 12:24:35 Re: [pgadmin-hackers] Feature request: limited deletions
Previous Message Thom Brown 2010-04-08 11:05:51 Re: [pgadmin-hackers] Feature request: limited deletions

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-04-08 11:53:19 Re: Remaining Streaming Replication Open Items
Previous Message Simon Riggs 2010-04-08 11:37:25 Re: Remaining Streaming Replication Open Items