Re: Transaction Log

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: Transaction Log
Date: 2003-06-05 18:04:47
Message-ID: 200306051104.47935.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

David,

> > So, is there a postgresql.conf setting for the location of the WAL log
> > or something?

No, not yet. In 7.4, there will be a compile-time option for the location.

> Or do I just symlink $PGDATA/pg_xlog to the other disk?

You can symlink it, or mount it. I use the latter method:

1. Back up postgresql data and your file system.
2. Shut down postgresql
3. Create new partion on new disk
4. mount new partition at /tmp/xlog
5. copy all files from $PGDATA/xlog to /tmp/xlog
6. Edit your /etc/fstab to re-mount the partition at /tmp/xlog at $PGDATA/xlog
7. Reboot the system (have your RH Linux boot/install disks handy in case you
made a mistake editing /etc/fstab).
8. re-start Postgresql.

Of course, usually when I install a database I've already put PGDATA/xlog on a
seperate partition, so I don't have to go through the above.

Also, I've found that 3-disk RAID 5 gives about the worst data writing
performance on Postgresql of any disk configuation; about 1/3 the speed of
raw SCSI, worse if WAL is on the same array. Increasing the number of disks
... or switching to RAID 1+0 ... makes a large difference.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse sfpug by date

  From Date Subject
Next Message David Wheeler 2003-06-05 18:16:24 Re: Transaction Log
Previous Message David Wheeler 2003-06-05 17:39:27 Re: Transaction Log