"Andrew Dunstan" <[EMAIL PROTECTED]> writes:

> Magnus Hagander wrote:
>> Alvaro Herrera wrote:
>>> Magnus Hagander wrote:
>>>     
>>> Note that their behavior on finding SHARING_VIOLATION or LOCK_VIOLATION
>>> is to retry forever until the error goes away, on the theory that the
>>> antivirus/backup software will soon release the file.
>>
>> Interesting. Maybe forever is going a bit too far, but retrying for <n>
>> seconds or so.

I think looping forever is the right thing. Having a fixed timeout just means
Postgres will break sometimes instead of all the time. And it introduces
non-deterministic behaviour too.

You could print a warning after 30s but then I think you have to keep trying
forever. Just like database operations hang forever waiting for a lock.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to