Re: [HACKERS] Move tablespace

2010-04-21 Thread Simon Riggs
On Wed, 2010-04-21 at 11:53 -0400, Tom Lane wrote: > Simon Riggs writes: > > On Wed, 2010-04-21 at 14:37 +0300, Heikki Linnakangas wrote: > >> I also think we shouldn't be fiddling with this at this stage in the > >> release cycle. > > > OK, but not because I see a problem with the technique. >

Re: [HACKERS] Move tablespace

2010-04-21 Thread Tom Lane
Simon Riggs writes: > On Wed, 2010-04-21 at 14:37 +0300, Heikki Linnakangas wrote: >> I also think we shouldn't be fiddling with this at this stage in the >> release cycle. > OK, but not because I see a problem with the technique. You made that plain already, but you have not convinced anyone e

Re: [HACKERS] Move tablespace

2010-04-21 Thread Simon Riggs
On Wed, 2010-04-21 at 14:37 +0300, Heikki Linnakangas wrote: > Simon Riggs wrote: > > On Tue, 2010-04-20 at 21:03 -0400, Tom Lane wrote: > >> Simon Riggs writes: > >>> Following patch writes a new WAL record that just says "copy foo to > >>> newts" and during replay we flush buffers and then re-ex

Re: [HACKERS] Move tablespace

2010-04-21 Thread Heikki Linnakangas
Simon Riggs wrote: > On Tue, 2010-04-20 at 21:03 -0400, Tom Lane wrote: >> Simon Riggs writes: >>> Following patch writes a new WAL record that just says "copy foo to >>> newts" and during replay we flush buffers and then re-execute the copy >>> (but only when InArchiveRecovery). So the copy happe

Re: [HACKERS] Move tablespace

2010-04-20 Thread Simon Riggs
On Tue, 2010-04-20 at 21:03 -0400, Tom Lane wrote: > Simon Riggs writes: > > Following patch writes a new WAL record that just says "copy foo to > > newts" and during replay we flush buffers and then re-execute the copy > > (but only when InArchiveRecovery). So the copy happens locally on the > >

Re: [HACKERS] Move tablespace

2010-04-20 Thread Tom Lane
Simon Riggs writes: > Following patch writes a new WAL record that just says "copy foo to > newts" and during replay we flush buffers and then re-execute the copy > (but only when InArchiveRecovery). So the copy happens locally on the > standby, not copying from primary to standby. We do this just

[HACKERS] Move tablespace

2010-04-20 Thread Simon Riggs
I just noticed that ALTER TABLE foo SET TABLESPACE new_tablespace; doesn't optimise writing WAL, so when streaming enabled it will copy the whole table to WAL and across the wire. My understanding was that ALTER TABLE had been optimised, though not as much as could be in this case. Following pa