From: Keith Worthington <keithw@narrowpathinc.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Re: Moving pg_xlog
Date: Wed, 1 Jun 2005 16:11:43 -0400
Message-ID: <20050601200610.M12354@narrowpathinc.com> (raw)
In-Reply-To: <14825.1117642780@sss.pgh.pa.us>
References: <20050601151618.M48325@narrowpathinc.com>
<14825.1117642780@sss.pgh.pa.us>
On Wed, 01 Jun 2005 12:19:40 -0400, Tom Lane wrote
> "Keith Worthington" <keithw@narrowpathinc.com> writes:
> > I have been reading about increasing PostgreSQL performance
> > by relocating the pg_xlog to a disk other than the one
> > where the database resides. I have the following pg_xlogs
> > on my system.
> >
> > /raid02/databases/pg_xlog
> > /raid02/rhdb_databases/pg_xlog
> > /raid02/databases-8.0.0/pg_xlog
> > /var/lib/pgsql/data/pg_xlog
> >
> > I have no idea why the forth entry is there. It is in the PostgreSQL
> > installation directory.
>
> It's there because the RPM sets up a database under /var/lib/pgsql/data.
>
> > 1) stop the postmaster
> > 2) rm -rf /var/lib/pgsql/data/pg_xlog
> > 3) mv /raid02/databases/pg_xlog /var/lib/pgsql/data/pg_xlog
> > 4) ln -s /var/lib/pgsql/data/pg_xlog /raid02/databases/pg_xlog
> > 5) start postmaster
>
> Put the xlog anywhere BUT there!!!!!!!!!
>
> > If I can do that and place the pg_xlog in the installation
> > directory will I create any installation issues the next
> > time I upgrade PostgreSQL?
>
> Oh, the installation will be just fine ... but your database will not
> be after the upgrade wipes out your WAL. Put the xlog under some
> non-system-defined directory.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
Thanks Tom. I am glad I asked before I leaped. 8-0
Is there a convention that most people follow. It would seem that anywhere in
the installation directory is a bad idea. From what I have read on other
threads it does not want to be in the database directory since in most cases
that would put it on the same disk as the database.
I am assuming due to lack of reaction that the symbolic link is not an issue.
Is there a cleaner or more appropriate way of moving the pg_xlog.
Finally, am I correct in assuming that as long as the postmaster is shut down
moving the log is safe?
Kind Regards,
Keith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: keithw@narrowpathinc.com, tgl@sss.pgh.pa.us
Subject: Re: Moving pg_xlog
In-Reply-To: <20050601200610.M12354@narrowpathinc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox