[EMAIL PROTECTED] wrote: > What I'm seeing is a few tasks doing lots of writing to the database (with > and without explicit transactions) preventing a reader task from getting a > chance to read. A SELECT can block for a *very* long time (my 60 second > timeout expires). >
What you describe is not writer starvation. It is not clear to me how what you describe is occurring. Only one task can write at a time. During its COMMIT, no other task can access the database. When the COMMIT finishes, locks are removed and all tasks have an opportunity to access the database again. Writers and readers have equal opportunity and so none should starve.
Writer starvation occurs when multiple readers are using the database. The readers always overlap (the next reader starts before the previous finishes) so that there is always a shared lock on the database. This prevents a writer from ever getting a turn. The new PENDING lock prevents writer starvation.
-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565