From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] ALTER TABLE ... SET TABLESPACE |
Date: | 2004-06-21 04:36:20 |
Message-ID: | Pine.LNX.4.58.0406211426170.26738@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Mon, 21 Jun 2004, Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)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.
I was just thinking that. I imagine that this would be useful for WAL
logging of createdb() when that functionality gets implemented.
We might also be able to use it as a speed up for cluster() (some time
in the future). That is, we could form a complete page in memory in
relation_rebuild() and then write it out directly.
Gavin
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2004-06-21 05:06:26 | Re: [PATCHES] ALTER TABLE ... SET TABLESPACE |
Previous Message | Tom Lane | 2004-06-21 04:22:33 | Re: [PATCHES] ALTER TABLE ... SET TABLESPACE |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2004-06-21 05:06:26 | Re: [PATCHES] ALTER TABLE ... SET TABLESPACE |
Previous Message | Tom Lane | 2004-06-21 04:22:33 | Re: [PATCHES] ALTER TABLE ... SET TABLESPACE |