Re: Sizing and striping log area

From: "news(dot)postgresql(dot)org" <brett_elliott(at)att(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Sizing and striping log area
Date: 2002-10-14 21:40:02
Message-ID: aofdjh$i5b$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


""Shridhar Daithankar"" <shridhar_daithankar(at)persistent(dot)co(dot)in> wrote in
message news:3DAAACC3(dot)24747(dot)8A66792(at)localhost(dot)(dot)(dot)
> On 13 Oct 2002 at 16:26, Brett wrote:
> >Forgive my ignorance, but what should I consider when sizing the
partition
> >which houses the pg_xlog area? Are logs cleared out every once in awhile
> >or do they continue to accumulate? Let's say your DB is around 4 GB,
> >what should the log area size be, or does the size of the DB not matter,
> >if not which factors should be considered?
>
> Well, you know the exact size of pg_xlogs in advance. It's 16MB*number of
WAL
> files. So for 40 WAL files in postgresql.conf, you get 640MB of pg_xlog.
>
> Yes, they are recycled. So they don't grow beyond this size. But from
> performance point of view, what's important is to put them on separate
drive,
> much better on separate IO channel.

Are they archived like Oracle logs? Oracle writes to a log area and reads
from the log area to generate archives. The archives are then used for
recovery in case of corruption. This is important because reading from the
drive throws off the head used for writing so seeking could be involved
given this situation where reading and writing happen on the same drive
concurrently. Oracle minimizes this by filling up, say, 500k of a certain
disk before writing the logs to the next disk. Then it reads the 500k of
logs and moves those to the archive. But if postgres doesn't use archives
then this isn't an issue.

Which leads me to another question... Does Postgres use archive logs and how
does Postgres recover if it doesn't use archive logs? Or does it not
recover as well as Oracle?

I realize that you get what you pay for so I'm prepared for the truth. :)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gyorgy Molnar 2002-10-14 21:57:11 Re: string concatenation
Previous Message am 2002-10-14 21:13:58 Re: Anyone want to assist with the translation of the Advocacy site?