Lists: | pgsql-novice |
---|
From: | Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | transaction log location |
Date: | 2003-09-25 06:40:35 |
Message-ID: | 3F728DE3.5060502@audax.com.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Have read the docs, tried to look through go(o)gles..
came up with nothing...
How can I make postgres to store transaction log on a different
drive?
Ie. my postgres files reside in /var/lib/pgsql (/dev/hda3)..
And I'd like to have transaction logs on a /dev/hdb1..
Regards
--
Marcin Gil
marcin.gil @ audax.com.pl, tel. 694972082
OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
tel/fax (44) 7247530, 7244401
From: | Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: transaction log location |
Date: | 2003-09-25 07:31:40 |
Message-ID: | 3F7299DC.8050801@audax.com.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Użytkownik Peter Childs napisał:
>
> 1. Shut it down the database.
> 2. Move data/pg_xlog and data/pg_clog to another drive.
> 3. Symlink data/pg_xlog and data/pg_clog to this other drive.
> 4. Restart the database.
>
Ohmigod.. I now should eat a lemon :)
The most simple and elegant solution ;) Someone wake me up..
--
Marcin Gil
marcin.gil @ audax.com.pl, tel. 694972082
OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
tel/fax (44) 7247530, 7244401
From: | Peter Childs <blue(dot)dragon(at)blueyonder(dot)co(dot)uk> |
---|---|
To: | Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: transaction log location |
Date: | 2003-09-25 07:32:40 |
Message-ID: | Pine.LNX.4.44.0309250818260.21236-100000@RedDragon.Childs |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
On Thu, 25 Sep 2003, Marcin Gil wrote:
> Have read the docs, tried to look through go(o)gles..
> came up with nothing...
>
> How can I make postgres to store transaction log on a different
> drive?
> Ie. my postgres files reside in /var/lib/pgsql (/dev/hda3)..
> And I'd like to have transaction logs on a /dev/hdb1..
>
> Regards
>
Once you have your database....
1. Shut it down the database.
2. Move data/pg_xlog and data/pg_clog to another drive.
3. Symlink data/pg_xlog and data/pg_clog to this other drive.
4. Restart the database.
Steps 1 and 4 are the most important!.
One word of warning even though this is a log it can not be used
to see whats happerning or as a method for backup.
Peter Childs
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Childs <blue(dot)dragon(at)blueyonder(dot)co(dot)uk> |
Cc: | Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: transaction log location |
Date: | 2003-09-25 13:31:26 |
Message-ID: | 2323.1064496686@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
Peter Childs <blue(dot)dragon(at)blueyonder(dot)co(dot)uk> writes:
> 1. Shut it down the database.
> 2. Move data/pg_xlog and data/pg_clog to another drive.
> 3. Symlink data/pg_xlog and data/pg_clog to this other drive.
> 4. Restart the database.
Actually, my recommendation would be to leave pg_clog on the data drive;
it's more of a data file than a log. The reason for putting WAL
(pg_xlog) on a separate drive is that it'w written a lot, and written
perfectly sequentially, and so you can reduce seek overhead a bunch if
writing WAL is the only thing that particular disk head has to do.
Putting pg_clog onto the same drive introduces the seek overhead you
were trying to avoid.
regards, tom lane