Re: recover from this error

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: recover from this error
Date: 2016-04-08 17:28:40
Message-ID: CANu8FizVw0Wyin0w3FTvSDmKDe_Kxzn==Gf4nmGF__RDeyjT6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 8, 2016 at 11:44 AM, Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
wrote:

> Alright, check kernel version, but what else, dump & restore?
>
> ERROR: unexpected data beyond EOF in block 1 of relation base/16388/35954
> HINT: This has been seen to occur with buggy kernels; consider updating
> your system.
>
> --
> Scott Ribe
> scott_ribe(at)elevated-dev(dot)com
> http://www.elevated-dev.com/
> https://www.linkedin.com/in/scottribe/
> (303) 722-0567 voice
>
>

>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

> 16388/35954 = DB/object

1.Get the object that is causing the problem:

SELECT datname FROM pg_database WHERE oid = 16388;

SELECT relname,
CASE
WHEN relkind = 'r' THEN 'TABLE'
WHEN relkind = 'i' THEN 'INDEX'
WHEN relkind = 'S' THEN 'SEQUENCE'
WHEN relkind = 'v' THEN 'VIEW'
WHEN relkind = 'c' THEN 'VIEW'
WHEN relkind = 'f' THEN 'Foreign Table'
ELSE 'Unknown'
END
FROM pg_class
WHERE relfilenode = 35954;

Make sure you have a good backup then:
2. DROP the bad object.
3. RESTORE the object.

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-04-08 17:28:42 Re: Postgresql 9.3.4 file system compatibility
Previous Message Adrian Klaver 2016-04-08 17:07:51 Re: Transitioning to a SQL db