Re: Restore deleted rows

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Restore deleted rows
Дата
Msg-id 4136ffa0905010301k760d487cm90451c8048d9f301@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Restore deleted rows  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers
On Wed, Apr 29, 2009 at 7:03 PM, Dimitri Fontaine
<dfontaine@hi-media.com> wrote:
> The idea is to have VACUUM not discard the no more visible tuples but store
> them on a specific fork (which you'll want to have on a WORM (cheap)
> tablespace, separate issue).
> Then you want to be able to associate the tuple xid info with a timestamptz
> clock, which could be done thanks to txid and txid_snapshot by means of a
> ticker daemon. PGQ from Skytools has such a daemon, a C version is being
> prepared for the 3.0 release (alpha1 released).

I think you would use the xid "epoch" which the txid data type stores.
You would need a mapping somewhere to translate timestamps to
snapshots and the epoch to use for that snapshot.

There's a tricky problem of how to find the old tuple values in the
new fork. You can't just store them in the same ctid slot because you
could have many with the same ctid. I suspect you might be able to get
away with making the new fork a btree with the ctid as the key.

-- 
greg


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: windows shared memory error
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: ECPG, two varchars with same name on same line