pgwin32_open returning EINVAL

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pgwin32_open returning EINVAL
Date: 2007-11-28 14:57:35
Message-ID: 20071128145735.GK5118@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

We've seen several cases of people (running 8.1 or 8.2) that see
messages like this:

2007-11-26 11:41:59 ERROR: could not open relation 1663/352369/353685: Invalid argument

The platform is Win32.

The problem is that pgwin32_open reduces any error code from
GetLastError that's not ERROR_PATH_NOT_FOUND, ERROR_FILE_NOT_FOUND,
ERROR_FILE_EXISTS or ERROR_ACCESS_DENIED into EINVAL, without further
notice. This is problematic because the true cause of the problem is
being hidden and it's hard to track down what's going on.

Can we do something like this to report the Win32 error code so that the
user has a higher chance of figuring out what's going on?

--
Alvaro Herrera Developer, http://www.PostgreSQL.org/
"Las navajas y los monos deben estar siempre distantes" (Germán Poo)

Attachment Content-Type Size
pgwin32_open.patch text/x-diff 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-11-28 15:06:16 Re: Still a NOTICE in dict_thesaurus.c
Previous Message Alvaro Herrera 2007-11-28 14:27:57 Re: [GENERAL] Empty arrays with ARRAY[]