Feature request: limited deletions

From: Thom Brown <thombrown(at)gmail(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Feature request: limited deletions
Date: 2010-04-08 10:06:18
Message-ID: g2sbddc86151004080306g24e0407dxd55dc9a7c89cd575@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-hackers

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.

... although I suspect there will be reasons against this.

Thom

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ian Barwick 2010-04-08 10:55:30 Re: Feature request: limited deletions
Previous Message Erwin Brandstetter 2010-04-07 17:47:12 Missing RULEs from VIEWs and their format

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-04-08 10:16:12 Re: Hot Standby: Startup at shutdown checkpoint
Previous Message Tom Lane 2010-04-08 08:53:40 Re: Oddly indented raw_expression_tree_walker