Обсуждение: btree_delete_page_redo: lost target page

Поиск
Список
Период
Сортировка

btree_delete_page_redo: lost target page

От
Chris Dunlop
Дата:
G'day all,

PG version: 7.4.7    (debian 7.4.7-6sarge2)
OS: Linux (debian sarge)

I started a 'vacuum full analyze' using pgsql, then, after
about 10 minutes, I issued a control-c in pgsql.  This hadn't
returned my prompt after another 10 minutes or so.  A glance at
the backend showed other processes running and some apparently
hanging around, possibly blocked by the vacuum.

Eventually I did a shutdown using the debian
/etc/init.d/postgresql script.  This tried shutting the
postmaster down cleanly, but eventually 'kill -9'ed the
postmaster (much to my surpise, given the ever present "TIP 2:
Don't 'kill -9' the postmaster" - just goes to show, you
shouldn't trust *anyone*!).

Anyhow, given the 'kill -9' I guess you could stop reading right
here...

Trying to start the postmaster again failed, with what looks
like the relevent message being:

  PANIC:  btree_delete_page_redo: lost target page

See the attached syslog.txt for the system logs.

Googling 'postgres "lost target page"' only came back with
extracts from nbtxlog.c rather than any previously reported
problems like this.

At this point I restored the database from our backups, however
I still have a copy of the corrupted data directory if there's
interest in trying to diagnose the problem.

The entire data directory is around 5 Gb so let me know if you'd
like to see something specific in there.

Cheers,

Chris.

Вложения

Re: btree_delete_page_redo: lost target page

От
Tom Lane
Дата:
Chris Dunlop <chris@onthe.net.au> writes:
> Trying to start the postmaster again failed, with what looks
> like the relevent message being:
>   PANIC:  btree_delete_page_redo: lost target page

This is a known possibility if the VACUUM FULL got as far as shortening
the index before crashing --- xlog replay gets unhappy if told to fix
a page that's not there anymore.  There's a fix in 8.2, which IIRC
seemed too complex to risk back-porting.

            regards, tom lane