Re: pg_xlog becomes extremely large during CREATE INDEX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_xlog becomes extremely large during CREATE INDEX
Date: 2004-05-13 03:18:41
Message-ID: 2971.1084418321@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jeffrey W. Baker" <jwbaker(at)acm(dot)org> writes:
> I have configured 24 checkpoint segments,
> which I expect gives me a worst-case usage in pg_xlog of 384MB.
> Unfortunately, during the CREATE INDEX, pg_xlog becomes full!

Postgres version? AFAIR 7.1.2 or thereabouts would act that way,
because it wouldn't discard log segments containing work of open
transactions.

The only reason I can think of for such behavior in a current version
is if the checkpoint isn't completing for some reason. Have you looked
in the postmaster log to see if checkpoint is bleating about anything?

Note that your calculation is off anyway: per documentation, recent
versions will allow up to 2*checkpoint_segments+1 WAL files to exist.
This is because we save the last two checkpoints worth of data.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2004-05-13 03:33:59 Functionality in database or external langauge
Previous Message Jeffrey W. Baker 2004-05-13 01:18:40 pg_xlog becomes extremely large during CREATE INDEX