Re: Old pg_xlog files

Lists: pgsql-general
From: "Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Old pg_xlog files
Date: 2006-03-22 18:37:54
Message-ID: ec9575e80603221037j192696f1y7cad85404bc42568@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I am running postgres 7.4.9 on an LFS system , and had a long outstanding
pg_checkpoint that seemed to prevent the DB from being cleanly shutdown.
The box was power cycled (not my choice...) and when it came up Postgres did
it's recovery and seemed to be fine.

Checkpoints appear to be up to date (via pg_controldata), but the pg_xlog
directory has 95 files, of which 90 are dated before midnight yesterday or
earlier.

Can I just delete them safely? Or is there some recovery method I can do?

Thanks.


From: Vivek Khera <vivek(at)khera(dot)org>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Old pg_xlog files
Date: 2006-03-22 19:03:13
Message-ID: 8B6E051F-41F2-4BA8-A0F3-89EFE0885BB7@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


On Mar 22, 2006, at 1:37 PM, Tass Chapman wrote:

> Checkpoints appear to be up to date (via pg_controldata), but the
> pg_xlog directory has 95 files, of which 90 are dated before
> midnight yesterday or earlier.
>
> Can I just delete them safely? Or is there some recovery method I
> can do?
>

no, do not delete them. they will eventually be re-used. check back
in a few days and see how old the various files are...


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vivek Khera <vivek(at)khera(dot)org>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Old pg_xlog files
Date: 2006-03-22 19:14:36
Message-ID: 18637.1143054876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Vivek Khera <vivek(at)khera(dot)org> writes:
> On Mar 22, 2006, at 1:37 PM, Tass Chapman wrote:
>> Checkpoints appear to be up to date (via pg_controldata), but the
>> pg_xlog directory has 95 files, of which 90 are dated before
>> midnight yesterday or earlier.
>>
>> Can I just delete them safely? Or is there some recovery method I
>> can do?

> no, do not delete them. they will eventually be re-used. check back
> in a few days and see how old the various files are...

If there are more than about 2*checkpoint_segments of them, the extras
will be removed by the next successful checkpoint. So there's really no
reason to touch them manually.

regards, tom lane


From: "Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Old pg_xlog files
Date: 2006-03-22 21:47:57
Message-ID: ec9575e80603221347j6294cf1ge4e94147c04e3584@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thanks all. It is finally begining to reuse them.

Any suggestions on what I can look at to see why the checkpoint was so far
outstanding and why it hung on in a Zombie state when we tried a soft boot?

On 3/22/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Vivek Khera <vivek(at)khera(dot)org> writes:
> > On Mar 22, 2006, at 1:37 PM, Tass Chapman wrote:
> >> Checkpoints appear to be up to date (via pg_controldata), but the
> >> pg_xlog directory has 95 files, of which 90 are dated before
> >> midnight yesterday or earlier.
> >>
> >> Can I just delete them safely? Or is there some recovery method I
> >> can do?
>
> > no, do not delete them. they will eventually be re-used. check back
> > in a few days and see how old the various files are...
>
> If there are more than about 2*checkpoint_segments of them, the extras
> will be removed by the next successful checkpoint. So there's really no
> reason to touch them manually.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Old pg_xlog files
Date: 2006-03-22 22:18:09
Message-ID: 20367.1143065889@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com> writes:
> Any suggestions on what I can look at to see why the checkpoint was so far
> outstanding and why it hung on in a Zombie state when we tried a soft boot?

If it was in a funny process state, I'd guess that there was some
hardware problem that caused a disk write request to hang up. You
can get stuck in uninterruptible disk wait for quite a long time if
the disk doesn't respond.

regards, tom lane


From: "Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Old pg_xlog files
Date: 2006-03-23 13:10:54
Message-ID: ec9575e80603230510k2b36080fi4e10b9dbddbcdbe2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thanks.
I'll see if I can get a scheduled maintenance check on this.

The disks seem to be good as they are a 0+1 RAID and all internal tests
show them to be in good health along with the controller. Would memory be a
good suspect?

On 3/22/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Tass Chapman" <tasseh(dot)postgres(at)gmail(dot)com> writes:
> > Any suggestions on what I can look at to see why the checkpoint was so
> far
> > outstanding and why it hung on in a Zombie state when we tried a soft
> boot?
>
> If it was in a funny process state, I'd guess that there was some
> hardware problem that caused a disk write request to hang up. You
> can get stuck in uninterruptible disk wait for quite a long time if
> the disk doesn't respond.
>
> regards, tom lane
>