Thread: Another postgres 'file not found' error

Another postgres 'file not found' error

From
"Ian Cass"
Date:
This is the second time within a week I've been hit by a peculiar 'file not
found' error. I've been replacing a few existing Oracle servers with
Postgres. I'm wondering if that was a wise decision :/

inbound=# update store set state = 0, timestamp = 'now' where timestamp <
(CURRENT_TIMESTAMP - interval '30 seconds') and accountid = '6';
ERROR:  cannot open segment 1 of relation store_ix1 (target block
1576985508): No such file or directory

--
Ian Cass



Re: Another postgres 'file not found' error

From
Achilleus Mantzios
Date:
On Thu, 13 Jun 2002, Ian Cass wrote:

> This is the second time within a week I've been hit by a peculiar 'file not
> found' error. I've been replacing a few existing Oracle servers with
> Postgres. I'm wondering if that was a wise decision :/

What version of pgsql/os are you using???
(Hoping you dont use any ancient pgsql along with an exotic os :)

> 
> inbound=# update store set state = 0, timestamp = 'now' where timestamp <
> (CURRENT_TIMESTAMP - interval '30 seconds') and accountid = '6';
> ERROR:  cannot open segment 1 of relation store_ix1 (target block
> 1576985508): No such file or directory
> 
> --
> Ian Cass
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com       mantzios@softlab.ece.ntua.gr



Re: Another postgres 'file not found' error

From
"Josh Berkus"
Date:
Ian,

> This is the second time within a week I've been hit by a peculiar
> 'file not
> found' error. I've been replacing a few existing Oracle servers with
> Postgres. I'm wondering if that was a wise decision :/

Not if you don't know how to run PostgreSQL or your machines, no. Migrating to a new platform without sufficient
testingor expertise
 
is always unwise (sorry, but you deserved that for the dig at
Postgres).

> inbound=# update store set state = 0, timestamp = 'now' where
> timestamp <
> (CURRENT_TIMESTAMP - interval '30 seconds') and accountid = '6';
> ERROR:  cannot open segment 1 of relation store_ix1 (target block
> 1576985508): No such file or directory

Either:
1. You have a bad PostgreSQL install.  What OS are you using?
2. You are out of disk space on the PostgreSQL partition.
3. You are having hardware errors, such as a corrupt HDD.
4. Your OS is having disk or file management errors.

Regardless, you'd better shutdown Postgres and defer all work on the
database until you've diagnosed your hardware/configuration problem.  I
hope you have a previous backup, as you may find that you need to
revert to an earlier backup to restore your data.

-Josh Berkus





Re: Another postgres 'file not found' error

From
"Ian Cass"
Date:
> Not if you don't know how to run PostgreSQL or your machines, no.
>   Migrating to a new platform without sufficient testing or expertise
> is always unwise (sorry, but you deserved that for the dig at
> Postgres).

Heh. Well it's most certainly the case I'm still learning about Postgres
(aren't we all?), but I did run it for a few months on unimportant stuff and
to be honest, this application I'm having trouble with at the moment is not
real important even though it's production. The database is being
continuously populated and drained by different applications (its a spool
area mainly), so activity is high even though volume is not.

> Either:
> 1. You have a bad PostgreSQL install.  What OS are you using?

Debian Woody with 2.4.18 Linux kernel. Postgres install from apt-get
(7.2.1).

> 2. You are out of disk space on the PostgreSQL partition.

Approx 15gig free.

> 3. You are having hardware errors, such as a corrupt HDD.

No other untoward signs.

> 4. Your OS is having disk or file management errors.

No other untoward signs.

> Regardless, you'd better shutdown Postgres and defer all work on the
> database until you've diagnosed your hardware/configuration problem.  I
> hope you have a previous backup, as you may find that you need to
> revert to an earlier backup to restore your data.

In this instance, simply dropping the index and recreating it solved the
problem. I'll continue using this configuration whilst trying to find the
problem, however I'll defer any future migrations though until I've got to
the root of it.

--
Ian Cass



Re: Another postgres 'file not found' error

From
Josh Berkus
Date:
Ian,

> Debian Woody with 2.4.18 Linux kernel. Postgres install from apt-get
> (7.2.1).

Hmmm.  I might suggest polling both the Debian mailing lists and the
pgsql-hackers mailing list.   I remember vaguely hearing about some bug with
Postgres on Debian, but I can't remember where I heard it.

It's also possible that one or more of the accessory applications you are
using is playing "fast and loose" with the filesystem, and in the process
damaging some of the Postgres files.

--
-Josh Berkus




Re: Another postgres 'file not found' error

From
Tom Lane
Date:
"Ian Cass" <ian.cass@mblox.com> writes:
> inbound=# update store set state = 0, timestamp = 'now' where timestamp <
> (CURRENT_TIMESTAMP - interval '30 seconds') and accountid = '6';
> ERROR:  cannot open segment 1 of relation store_ix1 (target block
> 1576985508): No such file or directory

and later:

> In this instance, simply dropping the index and recreating it solved the
> problem.

Yeah, it would seem that you had a bad tuple pointer in an index entry.
While this might have been induced by a software bug, I do not recall
many (if any) prior reports of such failures, so I'm leaning towards a
hardware glitch having caused it.  I'd recommend running some memory and
disk diagnostics ...
        regards, tom lane


Re: Another postgres 'file not found' error

From
Oliver Elphick
Date:
On Thu, 2002-06-13 at 19:01, Josh Berkus wrote:
> > Debian Woody with 2.4.18 Linux kernel. Postgres install from apt-get
> > (7.2.1).
>
> Hmmm.  I might suggest polling both the Debian mailing lists and the
> pgsql-hackers mailing list.   I remember vaguely hearing about some bug with
> Postgres on Debian, but I can't remember where I heard it.

I do not think there is any Debian bug report that looks like this. The
full bug list is at
http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=postgresql

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
    "Whether therefore ye eat, or drink, or whatsoever ye      do, do all to the glory of God."
           I Corinthians 10:31