Thread: Cannot read block 348938 of pdbsynchtable
Dear All ,
I am using postgres 7.3. on RHEL 4.0
If I do any operation(select , delete , count , update , vacuum,reindex) on a table ; the error comes "Cannot read block 348938 of pdbsynchtable"
Given below is the o/p of the files corresponding to the table
-rw------- 1 postgres postgres 1073741824 Apr 7 10:56 25205
-rw------- 1 postgres postgres 1073741824 Aug 29 2009 25205.1
-rw------- 1 postgres postgres 1073741824 Mar 30 12:32 25205.2
-rw------- 1 postgres postgres 1048674304 Apr 7 10:55 25205.3
-rw------- 1 postgres postgres 1073741824 Aug 29 2009 25205.1
-rw------- 1 postgres postgres 1073741824 Mar 30 12:32 25205.2
-rw------- 1 postgres postgres 1048674304 Apr 7 10:55 25205.3
I some blogs its given that this problem occurs due to bad sectors on disk and the resolution given is reidexing, vacuuming the table or restoring to the last backup.
In my case neither the table is getting reindexed nor vaccum ,even i am not able to get the count of the recordss in the table. There is no option of restoring to backup as i dont have one.
Even if If i try to pad the file 25205.3 using DD command I am not able to calculate the bytes to be padded as the total count of the blocks is comming out to be 521228 and the error is coming cannot read the 348938 block.
Kindly help in identifying and solving this problem.
Regards,
Utsav
Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the origin al intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL) accepts no responsibilities for los s or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no bin ding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL.
On Apr 7, 2010, at 11:12 PM, Utsav Turray wrote:
Dear All ,I am using postgres 7.3. on RHEL 4.0
I don't know the answer to your problem, but I do know that you have many, many years worth of bug fixes, improvements, and optimizations you are missing due to running on such old software. Newer versions are still free, so do yourself a favor and address whatever has kept you from upgrading until now.
On Thu, Apr 8, 2010 at 7:12 AM, Utsav Turray <utsav.turray@newgen.co.in> wrote: > Even if If i try to pad the file 25205.3 using DD command I am not able to > calculate the bytes to be padded as the total count of the blocks is comming > out to be 521228 and the error is coming cannot read the 348938 block. Assuming 25205 is the right file for this table then block 348938 would be in 25205.2 and be bytes 694,352kB - 694,360kB. try dd if=25205.2 of=/tmp/data bs=8192 skip=$(( 348938 - 2 * 128 * 1024)) count=1 see if you get the same error. If you do and you're happy to zero out the bad block, deleting any data on it you could do something like: dd if=/dev/zero of=25205.2 bs=8192 seek=$(( 348938 - 2 * 128 * 1024)) count=1 -- greg