Moving pg_xlog - Mailing list pgsql-performance

From Keith Worthington
Subject Moving pg_xlog
Date
Msg-id 20050601151618.M48325@narrowpathinc.com
Whole thread Raw
Responses Re: Moving pg_xlog
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to avoid database bloat
Next
From: Tom Lane
Date:
Subject: Re: Moving pg_xlog