On Wednesday 19 May 2004 13:02, [EMAIL PROTECTED] wrote:
> >   - If you can put WAL on separate disk(s), all the better.
> Does that mean only the xlog, or also the clog? As far as I understand, the
> clog contains some meta-information on the xlog, so presumably it is
> flushed to disc synchronously together with the xlog? That would mean that
> they each need a separate disk to prevent one disk having to seek too
> often...?

You can put clog and xlog on same drive. That should be enough in most cases. 
xlog is written sequentially and never read back other than for recovery 
after a crash. clog is typically 8KB or a page and should not be an IO 
overhead even in high traffic databases.

> >   - Battery-backed write-cache for your SCSI controller can be a big
> > performance win
> I probably won't be able to get such a setup for this project; that's why I
> am bothering about which disk will be seeking how often.

As I said earlier, xlog is written sequentially and if I am not mistaken clog 
as well. So there should not be much seeking if they are on a separate drive.

(Please correct me if I am wrong)

> >   - Tablespaces _should_ be available in the next release of PG, we'll
> > know for sure soon. That might make life simpler for you if you do want
> > to spread your database around by hand,
> Ok, I think tablespaces are not the important thing - at least for this
> project of ours.

Well, if you have tablespaces, you don't have to mess with symlinking 
clog/xlog or use location facility which is bit rough. You should be able to 
manage such a setup solely from postgresql. That is an advantage of 

> Here goes ... we are talking about a database cluster with two tables where
> things are happening, one is a kind of log that is simply "appended" to and
> will expect to reach a size of several million entries in the time window
> that is kept, the other is a persistent backing of application data that
> will mostly see read-modify-writes of single records. Two writers to the
> history, one writer to the data table. The volume of data is not very high
> and RAM is enough...

Even if you have enough RAM, you should use pg_autovacuum so that your tables 
are in shape. This is especially required when your update/insert rate is 

If your history logs needs to be rotated, you can take advantage of the fact 
that DDL's in postgresql are fully transacted. So you can drop the table in a 
transaction but nobody will notice anything unless it is committed. Makes a 
transparent rotation.



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to