Re: Replacing the corrupt "global" folder with older one

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема Re: Replacing the corrupt "global" folder with older one
Дата
Msg-id 47CD0E8B.702@sun.com
обсуждение исходный текст
Ответ на Replacing the corrupt "global" folder with older one  ("chris.jurado" <chris.jurado@primesoft.ph>)
Список pgsql-hackers
chris.jurado napsal(a):
> Sorry for sending this directly to the hackers mailing list. But, i think it did not belong in any other as it
involvesinternals about the files in the data directory.
 
> 
> 
> PostgreSQL version: 8.1.2
> Operating system:   Windows XP/2003
> 
> The PostgreSQL service is not starting anymore. When I manually start it, it said something like it started but ended
immediatelybecause it had no work to do. I encountered this error before but a simple re-installation fixed it. This
time,it didn't.
 
> 
> I've tried running the service using a backup data folder w/c was 2 days ago, it runs. When I switch back to the
current,I get the error above. So, I figured the current data must be corrupt. After examination of the data folder,
theglobal folder is now not a folder but a file that is 8KB in size (I found this out by trying out the reset_xlog
commandand it said it could no longer find the global/xxx file).  It could be the hard disk has a problem. I'm going to
replaceit soon.
 
> 
> I searched the documentation about what the global folder contains and found out that these contain cluster-wide
tableslike the list of databases, etc.
 
> 
> I wanted not to lose the latest transactions by restoring a backup. Now the question is this, is it ok to just copy
theglobal folder from my backup 2 days ago, and replace the one in my current data folder? I'm very very sure no DDL
statementswere executed or no new databases/other objects were created since my last backup. Only DML statements were
executedon the user's databases. Will I lose data if I do this? 
 

Global tables also contain information about vacuuming, freeze xid and 
oids. You could have problem for example with tuple visibility.
You can try it but backup current state first. And when it will work, 
dump all database cluster and regenerate it from a scratch. And try to 
use newer version of PostgreSQL (8.1.11 or better is 8.3).
    Zdenek


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "jomarba"
Дата:
Сообщение: pt_br translation
Следующее
От: Zdenek Kotala
Дата:
Сообщение: How to handle error message in PG_CATCH