Re: pgwin32_open returning EINVAL

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgwin32_open returning EINVAL
Date: 2007-12-16 02:28:15
Message-ID: 87fxy3qsow.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Andrew Dunstan" <andrew(at)dunslane(dot)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!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ivo nascimento 2007-12-16 02:49:59 stored procedures to webservices
Previous Message Trent Shipley 2007-12-16 00:59:20 Re: VLDB Features