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 queue table 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 updated to 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 > should work... 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 [EMAIL PROTECTED] Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org