pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
separate WAL
3+ messages / 3 participants
[nested] [flat]

* separate WAL
@ 2005-12-12 16:08 jose fuenmayor <jafn82@gmail.com>
  2005-12-12 16:12 ` Re: separate WAL Scott Marlowe <smarlowe@g2switchworks.com>
  2005-12-12 16:25 ` Re: separate WAL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: jose fuenmayor @ 2005-12-12 16:08 UTC (permalink / raw)
  To: pgsql-admin

How can I install pg_xlog (WAL) in another partition, i mean separate the
data directory from WAL, i have a single scsi disk with four partitions
/, /boot, /data(data for postgresql), /WAL(pg_xlog), i ve heard that by
doing this occurs a boost in postgreSQL performance, thanks in advance
anyone that helps me.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: separate WAL
  2005-12-12 16:08 separate WAL jose fuenmayor <jafn82@gmail.com>
@ 2005-12-12 16:12 ` Scott Marlowe <smarlowe@g2switchworks.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2005-12-12 16:12 UTC (permalink / raw)
  To: jose fuenmayor <jafn82@gmail.com>; +Cc: pgsql-admin

On Mon, 2005-12-12 at 10:08, jose fuenmayor wrote:
> How can I install pg_xlog (WAL) in another partition, i mean separate
> the data directory from WAL, i have a single scsi disk with four
> partitions
> /, /boot, /data(data for postgresql), /WAL(pg_xlog), i ve heard that
> by doing this occurs a boost in postgreSQL performance, thanks in
> advance anyone that helps me.

The basic process is this:

initdb your database (I assume you've already done that.)
shut down the database
as the pg user, cd to $PGDATA
cp -Rfp pg_xlog /some/other/vol/pg_xlog/
mv pg_xlog pg_xlog_old
ln -s /some/other/vol/pg_xlog pg_xlog
restart database.

Note that you want the other directory set to the proper permissions
(0700) and ownership (your pg user).



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: separate WAL
  2005-12-12 16:08 separate WAL jose fuenmayor <jafn82@gmail.com>
@ 2005-12-12 16:25 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-12-12 16:25 UTC (permalink / raw)
  To: jose fuenmayor <jafn82@gmail.com>; +Cc: pgsql-admin

jose fuenmayor <jafn82@gmail.com> writes:
> How can I install pg_xlog (WAL) in another partition, i mean separate the
> data directory from WAL, i have a single scsi disk with four partitions
> /, /boot, /data(data for postgresql), /WAL(pg_xlog), i ve heard that by
> doing this occurs a boost in postgreSQL performance, thanks in advance
> anyone that helps me.

If there's only one physical disk spindle, there is no performance value
in spreading PG across multiple partitions on that disk --- in fact that
will likely be a net loss, because it'll force larger seek distances
between the different files the database has to access.

The common recommendation is to put WAL on a separate *physical disk*.
If you don't have multiple disks there's no advantage to be gained.

(I have seen people put WAL on a separate logical partition anyway,
because it insulates the WAL from possible out-of-disk-space conditions
in the other partitions, which is a good thing because out-of-space
is a PANIC condition for WAL but not for the main DB.  But if you're
doing it because you think you'll gain performance you are misguided.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-12-12 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 16:08 separate WAL jose fuenmayor <jafn82@gmail.com>
2005-12-12 16:12 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-12-12 16:25 ` Tom Lane <tgl@sss.pgh.pa.us>

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