Thread: pg_clog problem (maybe)...

pg_clog problem (maybe)...

From
andrea gelmini
Date:
The problem:
1) I create a stupid function like:
CREATE FUNCTION p4() RETURNS integer AS '
BEGIN
FOR i IN 1..1000000 LOOP
insert into info values (random(),random());
END LOOP;
RETURN 1;
END;
' LANGUAGE plpgsql;

2) I create a new db and run "select p4();"

3) I open three connection to the same db and start operation as
   "begin work; select p4(); update info set data=RANDOM();commit;"
   "create index gino on info(x);"
   "begin work; update info set data=RANDOM();"

   Well, db schema is nothink more than this:
   create table info(meta text, data text, id serial primary key);

4) after a lot of work/insert I've got this:
   LOG:  recycled transaction log file "00000002000000B0"
   LOG:  recycled transaction log file "00000002000000B2"
   LOG:  recycled transaction log file "00000002000000B3"
   ERROR:  could not access status of transaction 859388209
   DETAIL:  open of file "/home/gelma/pg4/bin/../db/pg_clog/0333" failed:
   No such file or directory
   ERROR:  could not access status of transaction 859388209
   DETAIL:  open of file "/home/gelma/pg4/bin/../db/pg_clog/0333" failed:
   No such file or directory
   siae=# ERROR:  could not access status of transaction 859388209
   DETAIL:  open of file "/home/gelma/pg4/bin/../db/pg_clog/0333" failed:
   No such file or directory

I can reproduce this over and over...

The real problem is my configuration: a linux unstable kernel with a debian
unstable branch in a shiny new laptop (with no more test than a memtest86).
Everything else seems working well, of course it doesn't mean it's not my
fault.
Anyway, I write to you asking:
a) do you think it could be a problem of 7.4beta2 (not a problem of mine)?
   I remember Tom solved something like this years ago.
b) if so, can you show me next steps to narrow down the problem to give you
   a little help?

Thanks a lot for your work,
Andrea Gelmini

Re: pg_clog problem (maybe)...

From
Tom Lane
Date:
andrea gelmini <andrea.gelmini@linux.it> writes:
> 3) I open three connection to the same db and start operation as
>    "begin work; select p4(); update info set data=RANDOM();commit;"
>    "create index gino on info(x);"
>    "begin work; update info set data=RANDOM();"

>    Well, db schema is nothink more than this:
>    create table info(meta text, data text, id serial primary key);

Uh, there's no "x" column in "info".

> 4) after a lot of work/insert I've got this:
>    ERROR:  could not access status of transaction 859388209
>    DETAIL:  open of file "/home/gelma/pg4/bin/../db/pg_clog/0333" failed:
>    No such file or directory

I spent some time trying to reproduce this, with no success.  Could you
give a clearer recipe?

            regards, tom lane