On Tue, 2002-08-13 at 08:15, Tom Lane wrote:
> "Marc G. Fournier" <scrappy@hub.org> writes:
> >> I think Tom is on to something here. I meant to ask but never got
> >> around to it. Why would anyone need to move the XLOG after you've
> >> inited the db?
>
> > I just determined that disk I/O is terrible, so want to move the XLOG over
> > to a different file system that is currently totally idle ...
>
> Sure, needing to manually move the xlog directory is a plausible thing,
> but *you can already do it*. The current procedure is
>
> 1. shut down postmaster
> 2. cp -p -r xlog directory to new location
> 3. rm -rf old xlog directory
> 4. ln -s new xlog directory to $PGDATA/xlog
> 5. start postmaster
>
> With the patch it's almost the same, but you can instead of (4) substitute
Why not simply create a script which does this? Creation of "movexlog"
or some such beast which anally checked everything it did. As options,
you could simply pass it the src and dest and let it take care of the
rest.
Greg