Re: best practices for separating data and logs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: best practices for separating data and logs
Date: 2008-01-02 18:10:01
Message-ID: 17603.1199297401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Peter Koczan" <pjkoczan(at)gmail(dot)com> writes:
> I'm planning a lot of changes for migrating to PostgreSQL 8.3, among
> them being a better way of separating data and logs (transaction logs,
> that is).

> Currently, the OS and log data are on one disk system, and the data
> (including configs) are on the other disk system. After creating the
> database cluster, I copy the pg_xlog directory to the OS system and
> symlink it from the database.

> So, I'm wondering...

> - Are there any best practices, or better practices, than symlinking?

I believe 8.3's initdb has an explicit option for making pg_xlog be a
symlink to someplace. The results aren't different from doing it
manually, but it saves a step (and a chance for mistake).

> - How do other people have this set up, or recommend setting this up
> (e.g. also moving pg_clog or other things as well)?

I think consensus is that pg_clog is best treated as part of the data.
The point of moving xlog is that the heads on that drive will never have
to move away from the current xlog tip; as soon as you put something
else on that drive, you ruin the performance benefit.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bernhard D Rohrer 2008-01-02 18:31:14 Re: pg recovery
Previous Message Peter Koczan 2008-01-02 17:46:15 best practices for separating data and logs