![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi all, Attached is an updated ALTER TABLE ... SET TABLESPACE patch. It uses the block by block copy mechanism proposed by Tom and handles i) ALTER TABLE <index> .... and ii) Copying of TOAST tables and the TOAST table's index. It doesn't handle copying of system tables (pg_largeobject) and, in the interests of code reuse, the patch fiddles with the code used by CLUSTER. This isn't great but I wanted to get a patch in before 1 July since I think the feature is very important -- even for the first release. |
|
Thanks, Gavin |
#2
| |||
| |||
|
|
On Thu, 1 Jul 2004, Gavin Sherry wrote: Oh, and it doesn't handle WAL. Tom mentioned/agreed that btree's method of dumping whole pages into WAL would be the best/most efficient way to journaling this and that the btree code should be generalised. I haven't had time to look at this yet. |
#3
| |||
| |||
|
|
Attached is an updated ALTER TABLE ... SET TABLESPACE patch. It uses the block by block copy mechanism proposed by Tom and handles i) ALTER TABLE <index> .... and ii) Copying of TOAST tables and the TOAST table's index. It doesn't handle copying of system tables (pg_largeobject) and, in the interests of code reuse, the patch fiddles with the code used by CLUSTER. This isn't great but I wanted to get a patch in before 1 July since I think the feature is very important -- even for the first release. |
#4
| |||
| |||
|
|
Hi all, Attached is an updated ALTER TABLE ... SET TABLESPACE patch. It uses the block by block copy mechanism proposed by Tom and handles i) ALTER TABLE <index> .... and ii) Copying of TOAST tables and the TOAST table's index. It doesn't handle copying of system tables (pg_largeobject) and, in the interests of code reuse, the patch fiddles with the code used by CLUSTER. This isn't great but I wanted to get a patch in before 1 July since I think the feature is very important -- even for the first release. Thanks, Gavin |
|
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
#5
| |||
| |||
|
|
Attached is an updated ALTER TABLE ... SET TABLESPACE patch. Does this patch allow setting the tablespace of sequences as well? If so, then you will need to modify pg_dump of SERIAL sequences. Perhaps output a ALTER TABLE/SET TABLESPACE command after the CREATE TABLE definition to move the SERIAL sequence. The same argument applies if it allows moving indexes. (Unique and Primary Keys) |
#6
| |||
| |||
|
|
Hi all, Attached is an updated ALTER TABLE ... SET TABLESPACE patch. It uses the block by block copy mechanism proposed by Tom and handles i) ALTER TABLE <index> .... and ii) Copying of TOAST tables and the TOAST table's index. It doesn't handle copying of system tables (pg_largeobject) and, in the interests of code reuse, the patch fiddles with the code used by CLUSTER. This isn't great but I wanted to get a patch in before 1 July since I think the feature is very important -- even for the first release. Thanks, Gavin |
|
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org |
#7
| |||
| |||
|
|
Christopher Kings-Lynne <chriskl (AT) familyhealth (DOT) com.au> writes: Attached is an updated ALTER TABLE ... SET TABLESPACE patch. Does this patch allow setting the tablespace of sequences as well? If so, then you will need to modify pg_dump of SERIAL sequences. Perhaps output a ALTER TABLE/SET TABLESPACE command after the CREATE TABLE definition to move the SERIAL sequence. The same argument applies if it allows moving indexes. (Unique and Primary Keys) Sequences no, toast tables no, indexes yes. So we need the latter part of the above-mentioned patch. Anyone? |
#8
| |||
| |||
|
|
Added to TODO; * Allow moving sequences and toast tables to other tablespaces in case no one does it. |
#9
| |||
| |||
|
|
Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes: Added to TODO; * Allow moving sequences and toast tables to other tablespaces in case no one does it. Please remove that; if I thought either one was a good idea, I would have allowed it in the committed patch. Sequences are too small to be worth moving around, and may someday be reimplemented in a fashion that doesn't use up a separate disk file for each one. If we allow SET TABLESPACE on them we will be limiting our future flexibility for no useful gain. Toast tables are bound to their parent tables because (a) pg_dump isn't nearly smart enough to handle moving them, and (b) I've got concerns about how you decide whether a person is authorized to move one. regards, tom lane |
#10
| |||
| |||
|
|
Please remove that; if I thought either one was a good idea, I would have allowed it in the committed patch. Sequences are too small to be worth moving around, and may someday be reimplemented in a fashion that doesn't use up a separate disk file for each one. If we allow SET TABLESPACE on them we will be limiting our future flexibility for no useful gain. |
![]() |
| Thread Tools | |
| Display Modes | |
| |