Thread: could not write block
recently appears to me the following error :
could not write block 86 of relation 1663/121027/151994: Invalid argument
What is that error and how to fix this?
Michael.
__________ Information from ESET Smart Security, version of virus signature database 3862 (20090217) __________
The message was checked by ESET Smart Security.
http://www.eset.com
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
OS : Windows Server 2003 PostgreSQL : 8.2.4 Installed with Windows installer. On server is installed NOD32 (2.7). -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com] Sent: Wednesday, February 18, 2009 10:31 AM To: Kopljan Michael Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] could not write block 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 __________ Information from ESET Smart Security, version of virus signature database 3863 (20090218) __________ The message was checked by ESET Smart Security. http://www.eset.com __________ Information from ESET Smart Security, version of virus signature database 3863 (20090218) __________ The message was checked by ESET Smart Security. http://www.eset.com
Kopljan Michael wrote: > OS : Windows Server 2003 > PostgreSQL : 8.2.4 The current release of 8.2 is 8.2.12 - you are missing 12 separate sets of bug-fixes! You might want to read the release notes for 8.2.12 back to 8.2.5 http://www.postgresql.org/docs/8.2/static/release-8-2-12.html Normally you could just install the latest 8.2, but there are some notes you'll want to read first. > Installed with Windows installer. > > On server is installed NOD32 (2.7). OK - I recommend four steps: 0. Check your backups 1. Disable Norton (temporarily) 2. Upgrade to 8.2.12 (reading the release notes for what you have to do since you are bypassing versions 8.2.11 and 8.2.7 etc) 3. Test by clustering/reindexing the problem table/index idientified in your error message. If it looks fine with NOD32 turned off, turn it back on and test again. Once you know it's your antivirus then you'll need to read its manual and find out how to stop it from interfering with PostgreSQL. -- Richard Huxton Archonet Ltd