Re: Delete/update with limit
От
Csaba Nagy
Тема
Re: Delete/update with limit
Дата
Msg-id
1185352194.8615.53.camel@coppola.muc.ecircle.de
Ответ на
Re: Delete/update with limit (Stephan Szabo)
Список
Дерево обсуждения
Re: Delete/update with limit Chris Browne <cbbrowne@acm.org>
On Tue, 2007-07-24 at 19:06, Stephan Szabo wrote: > > Unfortunately I don't think this will work. Multiple backends will happily > > pick up the same ctid in their selects and then try to delete the same > > records. > > I'm pretty sure he said that the batch processing (and the delete) would > only be happening from one backend at a time, no concurrency on that > portion, merely concurrency with the large volume of inserts. Yes it's exactly like that... only it also happened accidentally that 2 batch processes started at the same time, and they should not double process the data, nor loose some of it. The above scheme is OK with that too... but the array version from Tom is even better :-) Regarding the proposed mark/process/delete version, we've done it that way, and we always managed to get some corner case which lost us data... so even if it's possible to do it well, it's definitely not easy. The delete/copy/process private data version is much safer, and it actually can be done in one transaction to assure crash safety. Cheers, Csaba.
В списке pgsql-general по дате отправления