Skip site navigation (1) Skip section navigation (2)

bug of recovery?

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: bug of recovery?
Date: 2011-09-26 09:50:06
Message-ID: CAHGQGwEEn13awaWZA-fMb76fNXASLLpqmUY8N-sK55ApZy-ErA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

Currently, if a reference to an invalid page is found during recovery,
its information
is saved in hash table "invalid_page_tab". Then, if such a reference
is resolved,
its information is removed from the hash table. If there is unresolved
reference to
an invalid page in the hash table at the end of recovery, PANIC error occurs.

What I'm worried about is that the hash table is volatile. If a user restarts
the server before reaching end of recovery, any information in the
hash table is lost,
and we wrongly miss the PANIC error case because we cannot find any unresolved
reference. That is, even if database is corrupted at the end of recovery,
a user might not be able to notice that. This looks like a serious problem. No?

To prevent the above problem, we should write the contents of the hash table to
the disk for every restartpoints, I think. Then, when the server
starts recovery,
it should reload the hash table from the disk. Thought? Am I missing something?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Responses

pgsql-hackers by date

Next:From: Kohei KaiGaiDate: 2011-09-26 09:58:56
Subject: Re: [v9.2] Fix Leaky View Problem
Previous:From: Kohei KaiGaiDate: 2011-09-26 09:08:15
Subject: Re: contrib/sepgsql regression tests are a no-go

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group