Loosing files after backend crash

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Loosing files after backend crash
Date: 2001-04-02 21:45:28
Message-ID: 200104022145.f32LjSZ16279@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Konstantin Solodovnikov (ks(at)tcnet(dot)ru) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Loosing files after backend crash

Long Description
After a backend crash the file for my sequence cannot be found.

I use PostgreSQL 7.1RC1 compiled by GCC 2.95.2 on FreeBSD 4.2-STABLE and that's what I encountered.

During execution of some sql code backend crashed (the reason for it's crashing is not the actual topic of this report).
I successfully re-run psql without restarting the postmaster.
And tried to delete the sequence, which i created in the previous session.
That's what pgsql told me:
---8<---
Netflow_Test=# drop SEQUENCE seq_i___data_buffer ;
ERROR: cannot open seq_i___data_buffer: No such file or directory
---8<---
I examined the system tables (ps_class) and found the tuple, describing my sequence.
The "relfilenode" attribute of the tuple contained the value "326210". I tried to find the file with that name in the database directory - it really was not there.
Thus, the backend crash has led not only to impossibility to complete my task, but also to loosing some data. The sequence was actually created in an already committed transaction, not in the one, that crashed.
Another problem is that I cannot fix the situation (drop that sequence) by standard PGSQL means.
I had to create an empty file with that name ("326210") for "DROP SEQUENCE" command to successfully complete.

As i guess, the situation is not reprodusable. Backend crashed many times before w/o such problems.

A little additional question/proposition: can there be any tool, which could find and resolve the errors in the system tables?

Best Regards,
Konstantin Solodovnikov.

Sample Code

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mikheev, Vadim 2001-04-02 22:14:13 RE: Loosing files after backend crash
Previous Message Tom Lane 2001-04-02 20:40:24 Re: Table constraint ordering disrupted by pg_dump