Error while vacuuming

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error while vacuuming

Akash Garg
I get this error when I run a VACUUM:

INFO:  vacuuming "pg_toast.pg_toast_100194"
vacuumdb: vacuuming of database "friend" failed: ERROR:  could not
open segment 1 of relation "pg_toast_100194_index" (target block
1226167840): No such file or directory

I'm assuming I can just delete and recreate the index in question,
although I'm not sure which index or table it's talking about.  Any
ideas?

Akash

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: Error while vacuuming

Tom Lane-2
Akash Garg <[hidden email]> writes:
> I get this error when I run a VACUUM:
> INFO:  vacuuming "pg_toast.pg_toast_100194"
> vacuumdb: vacuuming of database "friend" failed: ERROR:  could not
> open segment 1 of relation "pg_toast_100194_index" (target block
> 1226167840): No such file or directory

> I'm assuming I can just delete and recreate the index in question,
> although I'm not sure which index or table it's talking about.  Any
> ideas?

This probably means a corrupt next-page link in some page of the index.
I'd suggest
        REINDEX TABLE pg_toast.pg_toast_100194;

You might want to do the usual song and dance about memory and disk
hardware checks, too.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: Error while vacuuming

Akash Garg
Sounds good -- I will try that.  Will this REINDEX lock any queries
that are currently running on the database?  And is there anway to
find out what table this toast table is related to?

Thanks,
Akash

On 7/18/05, Tom Lane <[hidden email]> wrote:

> Akash Garg <[hidden email]> writes:
> > I get this error when I run a VACUUM:
> > INFO:  vacuuming "pg_toast.pg_toast_100194"
> > vacuumdb: vacuuming of database "friend" failed: ERROR:  could not
> > open segment 1 of relation "pg_toast_100194_index" (target block
> > 1226167840): No such file or directory
>
> > I'm assuming I can just delete and recreate the index in question,
> > although I'm not sure which index or table it's talking about.  Any
> > ideas?
>
> This probably means a corrupt next-page link in some page of the index.
> I'd suggest
>        REINDEX TABLE pg_toast.pg_toast_100194;
>
> You might want to do the usual song and dance about memory and disk
> hardware checks, too.
>
>                        regards, tom lane
>

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: Error while vacuuming

Tom Lane-2
Akash Garg <[hidden email]> writes:
> Sounds good -- I will try that.  Will this REINDEX lock any queries
> that are currently running on the database?  And is there anway to
> find out what table this toast table is related to?

IIRC, 100194 is the OID of the owning table.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: Error while vacuuming

Jim Buttafuoco
In reply to this post by Akash Garg
I believe the correct way is the following.

1. get the oid from pg_class for relname='pg_toast_100194'
2. lookup up the relname from pg_class where reltoastrelid = the oid from the first query.

so on my system
select oid from pg_class where relname='pg_toast_17070';
  oid  
-------
 17072
(1 row)

select relname from pg_class where reltoastrelid=17072;
   relname    
--------------
 sql_features
(1 row)


---------- Original Message -----------
From: Akash Garg <[hidden email]>
To: Tom Lane <[hidden email]>
Cc: [hidden email]
Sent: Mon, 18 Jul 2005 10:35:40 -0700
Subject: Re: [GENERAL] Error while vacuuming

> Sounds good -- I will try that.  Will this REINDEX lock any queries
> that are currently running on the database?  And is there anway to
> find out what table this toast table is related to?
>
> Thanks,
> Akash
>
> On 7/18/05, Tom Lane <[hidden email]> wrote:
> > Akash Garg <[hidden email]> writes:
> > > I get this error when I run a VACUUM:
> > > INFO:  vacuuming "pg_toast.pg_toast_100194"
> > > vacuumdb: vacuuming of database "friend" failed: ERROR:  could not
> > > open segment 1 of relation "pg_toast_100194_index" (target block
> > > 1226167840): No such file or directory
> >
> > > I'm assuming I can just delete and recreate the index in question,
> > > although I'm not sure which index or table it's talking about.  Any
> > > ideas?
> >
> > This probably means a corrupt next-page link in some page of the index.
> > I'd suggest
> >        REINDEX TABLE pg_toast.pg_toast_100194;
> >
> > You might want to do the usual song and dance about memory and disk
> > hardware checks, too.
> >
> >                        regards, tom lane
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
------- End of Original Message -------


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org