Re: SQLSTATE XX000 Internal Error 7

From: Ben Madin <lists(at)remoteinformation(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQLSTATE XX000 Internal Error 7
Date: 2012-05-03 06:46:16
Message-ID: 4DA91A99-4855-407F-8614-0BEEA309FDEC@remoteinformation.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

G'day Tom,

On 03/05/2012, at 11:57 AM, Tom Lane wrote:

> Ben Madin <lists(at)remoteinformation(dot)com(dot)au> writes:
>> SQLSTATE[XX000]: Internal error: 7 ERROR: could not open file "base/102979/430122_fsm": Invalid argument
>
> [ scratches head ... ] AFAICS the only documented reason for open() to
> fail with EINVAL on OS X is
>
> [EINVAL] The value of oflag is not valid.
>
> which is surely bogus since that code path calls it with a constant
> value for oflag --- there's no way it could fail just some of the time.
>
> So this is smelling like a kernel or filesystem bug. I wonder exactly
> which OS X update you're running, and what sort of filesystem the
> database is stored on.

I think that sounds bad!

The OSX Update is 10.7.3 (11D50)

The System is a 2.66 GHz Intel Core i7 with 8GB RAM.

The database is stored on a partition that looks like :

Capacity: 447.69 GB (447 687 770 112 bytes)
Available: 74.96 GB (74 956 308 480 bytes)
Writable: Yes
File System: Journaled HFS+
BSD Name: disk0s2
Mount Point: /
Content: Apple_HFS

and the data is stored in the /usr/local/pgsql-9.1/data directory, but there is a symlink (as I've retained the previous versions when I upgrade.) and so the /usr/local directory looks like :

lrwxr-xr-x 1 root wheel 9 1 May 11:11 pgsql -> pgsql-9.1
drwxr-xr-x 11 root wheel 374 17 Feb 21:26 pgsql-8.4
drwxr-xr-x 8 root admin 272 17 Feb 21:26 pgsql-9.0
drwxr-xr-x 8 root admin 272 17 Feb 22:41 pgsql-9.1

and the data directory :

drwx------ 20 _postgres _postgres 680 1 May 11:11 data

is this the sort of exact information you were wondering?

Since I last posted, I have again received :

PL/pgSQL function "fill_ctybnda" line 18 at EXECUTE statement
ERROR: could not open file "base/102979/430320_fsm": Invalid argument

and I went looking and found in the base/102979/ directory:

-rw------- 1 _postgres _postgres 1253376 3 May 11:51 430320
-rw------- 1 _postgres _postgres 24576 3 May 11:51 430320_fsm

so it look to my uneducated eye as though it has been able to open the file(quite a few of the files ending in _fsm have 24576 bytes)

(PS How did you come to deciding that it was EINVAL - is that 'Error INVALid argument'?)

cheers

Ben

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2012-05-03 06:52:46 Re: new rows based on existing rows
Previous Message Alexander Reichstadt 2012-05-03 06:33:06 Re: pqlib garbage collection