Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-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

pgsql-hackers by date

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

pgadmin-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group