Thread: Performance tunning

Performance tunning

From
Romildo Wildgrube
Date:
Hi,

According to some postings it looks like there is a recommendation to
separate the database files from the transaction logs into separated
disk/raid. I was wondering if someone know where the transaction logs
are setup and how can I change to point to a new location.

Romi


Re: Performance tunning

From
"scott.marlowe"
Date:
On Mon, 28 Jul 2003, Romildo Wildgrube wrote:

> Hi,
>
> According to some postings it looks like there is a recommendation to
> separate the database files from the transaction logs into separated
> disk/raid. I was wondering if someone know where the transaction logs
> are setup and how can I change to point to a new location.

Your transaction logs and commit logs are in pg_xlog and pg_clog
respectively in your $PGDATA directory.  first, shut down the database:
'pg_ctl stop'  Then copy them elsewhere, rename the source directory
(don't delete until you're sure everything is working) and then link the
new directories under $PGDATA:

pg_ctl stop
cd $PGDATA
mkdir someotherplace/pg_xlog
mkdir someotherplace/pg_clog
cp -Rfp pg_xlog/* someotherplace/pg_xlog/
cp -Rfp pg_clog/* someotherplace/pg_clog/
mv pg_xlog pg_xlog_old
mv pg_clog pg_clog_old
ln -s someotherplace/pg_xlog/ pg_xlog
ln -s someotherplace/pg_clog/ pg_clog
pg_ctl start

That should do it.