Search Postgresql Archives

Re: corrupted item pointer:???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"hubert depesz lubaczewski" <depesz@xxxxxxxxx> writes:
> i made pg_filedump _FILE_ > ~/_FILE_.dump
> it went fine
> grep -i error ~/*.dump also didn't show anything.

Oh, that's interesting.  Looking more closely, the test in
PageRepairFragmentation()

                if (itemidptr->itemoff < (int) pd_upper ||
                    itemidptr->itemoff >= (int) pd_special)
                    ereport(ERROR,
                            (errcode(ERRCODE_DATA_CORRUPTED),
                             errmsg("corrupted item pointer: %u",
                                    itemidptr->itemoff)));

is slightly tighter than what pg_filedump does:

	  // Make sure the item can physically fit on this block before
	  // formatting
	  if ((itemOffset + itemSize > blockSize) ||
	      (itemOffset + itemSize > bytesToFormat))
	    printf ("  Error: Item contents extend beyond block.\n"
		    "         BlockSize<%d> Bytes Read<%d> Item Start<%d>.\n",
		    blockSize, bytesToFormat, itemOffset + itemSize);

I'm guessing that the lack of a check for itemOffset < pd_upper is why
pg_filedump is failing to notice anything wrong.  Do you want to add one
and try again?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux