Thread: vacuum crash

vacuum crash

From
Bruce Momjian
Date:
Here is a modified version of the vacuum crash I am studying.

Interesting is that if I do a 'vacuum getting' instead of 'select * from
getting;vacuum;', I see a different error message.  Rather than a crash
due to an Assert(), psql shows:

    NOTICE:  AbortTransaction and not in in-progress state
    NOTICE:  AbortTransaction and not in in-progress state

and the postmaster log file shows:

    ERROR:  cannot write block -1 of  [] blind
    AbortCurrentTransaction
    NOTICE:  AbortTransaction and not in in-progress state

This can be debugged by commenting out the psql command at the end,
running the script, and then running a backend from gdb and doing
'vacuum getting'.

This looks like it may be easier to track down.  Vadim, any chance you
can bail me out here, again.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

#!/bin/sh

DBNAME=ptest

destroydb $DBNAME
createdb $DBNAME
psql -e $DBNAME <<EOF
create table header
(
    host    text    not null,
    port    int    not null,
    path    text    not null,
    file    text    not null,
    extra    text    not null,
    name    text    not null,
    value    text    not null
);
create index header_url_idx on header (host, port, path, file, extra);
create unique index header_uniq_idx on header (host, port, path, file, extra, name);

create table reference
(
    f_url    text    not null,
    t_url    text    not null
);
create index reference_from_idx on reference (f_url);
create index reference_to_idx on reference (t_url);
create unique index reference_uniq_idx on reference (f_url, t_url);

create table extension
(
    ext    text    not null,
    note    text
);
create unique index extension_ext_idx on extension (ext);

create table getting
(
    host    text    not null,
    port    int    not null,
    ip    text    not null,
    when    datetime    not null
);
--create unique index getting_ip_idx on getting (ip);
EOF
#psql -c "delete from getting; vacuum;" $DBNAME
    psql -c "vacuum getting;" $DBNAME
#    psql -c "select * from getting; vacuum;" $DBNAME
#psql -c "delete from getting;" $DBNAME
#psql -c "select * from getting;" $DBNAME
#psql -c "vacuum;" $DBNAME
#psql -c "vacuum; vacuum;" $DBNAME



Re: [HACKERS] vacuum crash

From
"Thomas G. Lockhart"
Date:
> Here is a modified version of the vacuum crash I am studying.
> Interesting is that if I do a 'vacuum getting' instead of 'select *
> from getting;vacuum;', I see a different error message.  Rather than a
> crash due to an Assert(), psql shows:
>         NOTICE:  AbortTransaction and not in in-progress state
>         NOTICE:  AbortTransaction and not in in-progress state
> and the postmaster log file shows:
>         ERROR:  cannot write block -1 of  [] blind
>         AbortCurrentTransaction
>         NOTICE:  AbortTransaction and not in in-progress state
> This can be debugged by commenting out the psql command at the end,
> running the script, and then running a backend from gdb and doing
> 'vacuum getting'.

Well Oleg, you are not alone now. Others are seeing your problem, so it
is much more likely to be fixed than when it was just one person
reporting the symptom. If you are familiar with backend code then
perhaps you could help track down the problem. If you aren't familiar
with it, you may be interested in volunteering to test patches from
Bruce. This would be especially helpful since you have a real talent for
demonstrating this problem :)

                      - Tom

Re: [HACKERS] vacuum crash

From
Oleg Bartunov
Date:
On Thu, 8 Oct 1998, Thomas G. Lockhart wrote:

> Date: Thu, 08 Oct 1998 06:33:50 +0000
> From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
> To: Oleg Bartunov <oleg@sai.msu.su>
> Cc: Bruce Momjian <maillist@candle.pha.pa.us>,
>     PostgreSQL-development <hackers@postgreSQL.org>
> Subject: Re: [HACKERS] vacuum crash
>
> > Here is a modified version of the vacuum crash I am studying.
> > Interesting is that if I do a 'vacuum getting' instead of 'select *
> > from getting;vacuum;', I see a different error message.  Rather than a
> > crash due to an Assert(), psql shows:
> >         NOTICE:  AbortTransaction and not in in-progress state
> >         NOTICE:  AbortTransaction and not in in-progress state
> > and the postmaster log file shows:
> >         ERROR:  cannot write block -1 of  [] blind
> >         AbortCurrentTransaction
> >         NOTICE:  AbortTransaction and not in in-progress state
> > This can be debugged by commenting out the psql command at the end,
> > running the script, and then running a backend from gdb and doing
> > 'vacuum getting'.
>
> Well Oleg, you are not alone now. Others are seeing your problem, so it
> is much more likely to be fixed than when it was just one person
> reporting the symptom. If you are familiar with backend code then
> perhaps you could help track down the problem. If you aren't familiar
> with it, you may be interested in volunteering to test patches from
> Bruce. This would be especially helpful since you have a real talent for
> demonstrating this problem :)
>
>                       - Tom
>

Unfortunately I'm not familiar with backend code but would happy
to test everything as soon as patches will be available.

    Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83