Re: getting a error message when creating temporary table

From: Evan Walter <ewalter(at)decisionanalyst(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: getting a error message when creating temporary table
Date: 2014-04-28 23:38:25
Message-ID: CAOHVLOE6xcFA0hibHxBFO+etiJx6i=otM23O+5V0Z8VuC+Pk8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks for the replies, sorry for not giving more details/background.

It is version 9.1.9
os is ubuntu on an Amazon ec2 server

The directory is global/26745

The server is a backend for python django applications. We started having
problems last Thursday. Queries were running a very long time. And there
were some application issues that were affecting the database. It is my
understanding that the application issues have been fixed. We were also on
version 9.1.1.

Anyway, on Friday we called an oustide specialist who broke replication.
rsync-ed the files to a new volume drive, upgraded the version of
Postgresql, and rebuilt it with the new version. Performance-wise queries
are running well now, but we are getting that error.

We have rebuilt some of the indexes. Some of the tables are quite large,
so we re-create the indexes concurrently and drop the original.

We will reindex some of the catalog indexes tonight and see if that helps.

Thank you

Evan

On Mon, Apr 28, 2014 at 5:48 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Evan Walter <ewalter(at)decisionanalyst(dot)com> writes:
> > Not sure what is causing this. When we execute:
> > CREATE TEMPORARY TABLE test(test_code varchar (255))
>
> > We get
>
> > ERROR: could not read block 6 in file "global/... " read only 0 of 8192
> > bytes
>
> What's the exact filename you omitted there, and which PG version is this?
>
> I'm guessing this indicates corruption of pg_shdepend or one of its
> indexes, as that seems like the only shared catalog that's really likely
> to get touched during a CREATE TEMP TABLE. If you're lucky, it's one of
> the indexes, and a REINDEX will fix it.
>
> Have you had any OS-level crashes lately, power failures, etc? Whatever
> is corrupted exactly, this shouldn't have happened if filesystem integrity
> was being maintained properly.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-04-29 02:45:13 Re: getting a error message when creating temporary table
Previous Message Tom Lane 2014-04-28 22:48:29 Re: getting a error message when creating temporary table