Re: pgwin32_open returning EINVAL - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: pgwin32_open returning EINVAL
Date
Msg-id 87fxy3qsow.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: pgwin32_open returning EINVAL  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pgwin32_open returning EINVAL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.net> 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!


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: EXPLAIN ANALYZE printing logical and hardware I/O per-node
Next
From: "ivo nascimento"
Date:
Subject: stored procedures to webservices