pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keith Worthington <keithw@narrowpathinc.com>
To: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Moving pg_xlog
Date: Wed, 1 Jun 2005 11:31:13 -0400
Message-ID: <20050601151618.M48325@narrowpathinc.com> (raw)

Hi All,

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

The second and third entries are from backups that were made before major
upgrades so I am expecting that I can blow them away.

The first entry is in the directory where my databases are located.

I have no idea why the forth entry is there.  It is in the PostgreSQL
installation directory.

Here is my filesystem.
# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda6              9052552   2605292   5987404  31% /
/dev/sda1               101089     32688     63182  35% /boot
none                   1282880         0   1282880   0% /dev/shm
/dev/sdb2             16516084     32836  15644256   1% /raid01
/dev/sdb3             16516084   1156160  14520932   8% /raid02
/dev/sda5              2063504     32916   1925768   2% /tmp
/dev/sda3              4127108    203136   3714324   6% /var
/dev/cdrom              494126    494126         0 100% /mnt/cdrom

Can I

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

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?

TIA

Kind Regards,
Keith



view thread (10+ messages)  latest in thread

Message-ID: <20050601151618.M48325@narrowpathinc.com>
Permalink:  ../20050601151618.M48325@narrowpathinc.com/
Also on:    postgresql.org/message-id/20050601151618.M48325@narrowpathinc.com

 · 

reply

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
  Subject: Re: Moving pg_xlog
  In-Reply-To: <20050601151618.M48325@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