Re: after using pg_resetxlog, db lost
От | Richard Huxton |
---|---|
Тема | Re: after using pg_resetxlog, db lost |
Дата | |
Msg-id | 40D890F3.8090208@archonet.com обсуждение исходный текст |
Ответ на | Re: after using pg_resetxlog, db lost (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: after using pg_resetxlog, db lost
|
Список | pgsql-performance |
Tom Lane wrote: > "Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca> writes: > >>The pg_resetxlog was run as root. It caused ownership problems of >>pg_control and xlog files. >>Now we have no access to the data now through psql. The data is still >>there under /var/lib/pgsql/data/base/17347 (PWFPM_DEV DB name). But >>there is no reference to 36 of our tables in pg_class. Also the 18 >>other tables that are reported in this database have no data in them. >>Is there anyway to have the database resync or make it aware of the data >>under /var/lib/pgsql/data/base/17347? >>How can this problem be resolved? > > > What this sounds like is that you reset the transaction counter along > with the xlog, so that those tables appear to have been created by > transactions "in the future". This could be repaired by doing > pg_resetxlog with a more appropriate initial transaction ID, but > figuring out what that value should be is not easy :-( Tom - would there be any value in adding this to a pg_dump? I'm assuming the numbers attached to tables etc are their OIDs anyway, so it might be a useful reference in cases like this. -- Richard Huxton Archonet Ltd
В списке pgsql-performance по дате отправления: