Re: [PATCHES] ALTER TABLE ... SET TABLESPACE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Дата
Msg-id 22762.1087791753@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] ALTER TABLE ... SET TABLESPACE  (Gavin Sherry <swm@linuxworld.com.au>)
Список pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> On Sun, 20 Jun 2004, Tom Lane wrote:
>> Maybe you have to dump each block into WAL as you copy it.
>> That would be kinda ugly ... though in point of fact less of a WAL load
>> than writing individual tuples ...

> Should I use the WAL-enabled case of  _bt_blwritepage() as a guide here?

Yeah, actually that is a very good parallel.  If PITR archiving isn't
turned on, you don't have to dump pages into WAL; you can substitute
an fsync before commit, instead.  And if it's a temp table then you
don't have to do either.  (Not sure anyone would ever do SET TABLESPACE
on a temp table, but might as well get it right.)

The xlog action here of copying a page image is currently
btree-specific, but maybe we should move it to a more widely visible
place, such as heapam.c.  I don't see any value in having identical
xlog recovery actions in several different modules.
        regards, tom lane


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

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] ALTER TABLE ... SET TABLESPACE