Re: could not write block

From: Richard Huxton <dev(at)archonet(dot)com>
To: Kopljan Michael <kopljan(at)beotel(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: could not write block
Date: 2009-02-18 09:31:24
Message-ID: 499BD56C.7020600@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kopljan Michael wrote:
> recently appears to me the following error :

*ALWAYS* with this sort of thing you need to supply the following
information:
1. Operating system
2. Version of PostgreSQL
3. How you installed it (compiled from source, windows installer, ubuntu
package etc).

Oh - and if you're getting *any* error the first thing you want to do is
check that your backups are working.

> could not write block 86 of relation 1663/121027/151994: Invalid argument
>
> What is that error and how to fix this?

Well, it means that the backend couldn't write to the indicated block
(86) in a particular file. The next three numbers should be oid or
filenode for the tablespace, database and table/index in question. Try
looking for 121027 and 151994 in the following two queries.

SELECT oid,datname FROM pg_database WHERE oid = 121027;
SELECT oid,relfilenode,relname FROM pg_class WHERE oid=151994 OR
relfilenode = 151994;

Now "Invalid argument" looks like an odd error to get - I could
understand something like "permission denied" or "block doesn't exist".
This leads me to suspect two things:
1. You are running on Windows
2. You have an anti-virus/security package running

If these aren't true, I'd guess you'd had a crash or power failure recently.

Once we know what table/index it is we can try clustering/reindexing it
to reproduce the error (remember to check your backups first!).

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kopljan Michael 2009-02-18 09:39:32 Re: could not write block
Previous Message Gerd König 2009-02-18 09:26:11 Re: Download link for 'Bristlecone'