Re: Detach/attach table and index data files from one cluster to another

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Detach/attach table and index data files from one cluster to another
Дата
Msg-id 20130412161213.GH30671@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Detach/attach table and index data files from one cluster to another  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan escribió:
>
> On 04/12/2013 10:15 AM, Tom Lane wrote:
> >Sameer Thakur <samthakur74@gmail.com> writes:
> >>The proposed tool tries to make migration faster for tables and indices
> >>only by copying their binary data files.
> >There's 0 chance of making that work, because the two databases wouldn't
> >have the same notions of committed XIDs.
>
> Yeah. Trying to think way outside the box, could we invent some sort
> of fixup mechanism that could be applied to adopted files? Of
> course, that could slow things down so much that it wouldn't be
> worth it, but it might be a nice research project.

I think the fixup procedure involves freezing Xids (prior to the
transporting), which the OP said he didn't want to do.

If you don't freeze beforehand, there's not enough info in the new
cluster to know which tuples are dead/alive.  Another option would be to
have a "private" copy of pg_clog/pg_subtrans for the transported
table(s), but that seems very difficult to arrange.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: (auto)vacuum truncate exclusive lock
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Detach/attach table and index data files from one cluster to another