Re: Recovering deleted or updated rows

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Re: Recovering deleted or updated rows
Дата
Msg-id 455C7622.3030400@phlo.org
обсуждение исходный текст
Ответ на Re: Recovering deleted or updated rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> "Florian G. Pflug" <fgp@phlo.org> writes:
>> I'm looking for a way to recover deleted or old versions of
>> accidentally updated rows from a postgres 7.4 database. I've
>> verified that the relevant tables haven't been vacuumed since
>> the accident took place.
>
>> I was thinking that it might work to patch the clog so that
>> the offending transactions look like they have never been
>> comitted? Would that work? How could I patch the clog?
>
> By this point the lost rows are no doubt marked HEAP_XMAX_COMMITTED,
> which means that hacking the clog entries wouldn't accomplish anything
> by itself --- you'd have to go and unset those hint bits, too.
>
> Given that, you might as well not bother with patching clog; it
> wouldn't be any more trouble to unset HEAP_XMAX_COMMITTED and set
> HEAP_XMAX_INVALID in each tuple you needed to resurrect.
>
> You'd need a custom tool to do either though :-(
Thanks for you comments - they have been enlighting as usual ;-)

Fortunatly, the customer changed his mind, and now will manually
reenter the lost data.

Thanks anyways,
Florian Pflug


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Partial index
Следующее
От: "Ardian Xharra"
Дата:
Сообщение: Re: Why the data changes it's value by itself!