Re: allow LIMIT in UPDATE and DELETE
От | Jim C. Nasby |
---|---|
Тема | Re: allow LIMIT in UPDATE and DELETE |
Дата | |
Msg-id | 20060523221958.GG64371@pervasive.com обсуждение исходный текст |
Ответ на | Re: allow LIMIT in UPDATE and DELETE (Shelby Cain <alyandon@yahoo.com>) |
Ответы |
Re: allow LIMIT in UPDATE and DELETE
|
Список | pgsql-general |
On Mon, May 22, 2006 at 03:49:01PM -0700, Shelby Cain wrote: > My experience with job queues comes from clients that mostly use Oracle as the backend. However, even with Oracle a queuetable should be storing information about a job and not have records unnecessarily locked simply because they are being"worked on" by another hypothetical "job runner" process... by this I mean that the status of a job should be updatedto a distinct state at any given moment in time (eg: unprocessed, processing, processed). In the case I present above,if you are using Postgresql you wouldnt have any open long-running transactions on that table and vacuuming shouldwork... or am I misunderstanding the issue? The issue is that vacuum has to base it's decisions not on the oldest running transaction that has locks on a table, but on the oldest running transaction in the entire database, because that transaction could start reading any table at any time. Until that changes, long-running transactions of any kind and heavy-update tables simply won't mix well at all in a single database. I recently proposed a way around this [1], but it didn't get much traction. [1] http://archives.postgresql.org/pgsql-general/2006-05/msg00184.php -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-general по дате отправления: