RE: [ADMIN] SOS !!: Porstgress forgot all ! Help !

Started by Mikheev, Vadimalmost 25 years ago4 messages
#1Mikheev, Vadim
vmikheev@SECTORBASE.COM

Then if I reindex my DB I have :

NOTICE: --Relation astro--
NOTICE: Pages 204: Changed 0, reaped 0, Empty 0, New 0; Tup
4878: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 324, MaxLen 324;
Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU

0.04s/0.18u sec.

NOTICE: Index astro_pkey: Pages 25; Tuples 4878. CPU 0.01s/0.01u sec.

If I do :
select * from astro;

I have :

...

(0 rows)

Well, it may be caused by corrupted next_xid in pg_variable.
Could you

CREATE TABLE foo (bar int);
select xmin from pg_class where relname = 'foo';

and say what is exact size of pg_log file?

Vadim

#2Mikheev, Vadim
vmikheev@SECTORBASE.COM
In reply to: Mikheev, Vadim (#1)

before this manipulmation, pg_log = 1.073.741.824

Ohhhh, your system reached max transaction ID -:(

and xmin = 4982339

And now all tuples with xmin > ~5000000 are invisible.

One way to restore data could be hack vacuum to update
xmin of all valid tuples to 512, vacuum all tables,
dump data, initdb new fresh database etc -:((

Vadim

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mikheev, Vadim (#2)
Re: RE: [ADMIN] SOS !!: Porstgress forgot all ! Help !

"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:

before this manipulmation, pg_log = 1.073.741.824

Ohhhh, your system reached max transaction ID -:(

That's two reports now of people who have managed to wrap around the XID
counter. It doesn't seem that hard to do in a heavily used database.

Does anyone want to take more seriously the stopgap solution I proposed
for this problem (pghackers archives around 3-Nov-00)? I believe you
shot it down that time, but I don't think that ignoring the problem
for another release cycle is a better answer.

regards, tom lane

#4Vadim Mikheev
vmikheev@sectorbase.com
In reply to: Mikheev, Vadim (#2)
Re: RE: [ADMIN] SOS !!: Porstgress forgot all ! Help !

Ohhhh, your system reached max transaction ID -:(

That's two reports now of people who have managed to wrap around the XID
counter. It doesn't seem that hard to do in a heavily used database.

Does anyone want to take more seriously the stopgap solution I proposed
for this problem (pghackers archives around 3-Nov-00)? I believe you
shot it down that time, but I don't think that ignoring the problem
for another release cycle is a better answer.

Actually, I believed that you've done this temp solution till I've found
that it's not true couple weeks ago. If you'll do this please don't forget
about reusing ID of *committed* transactions and crashes - this should
be handled somehow on recovery.

Vadim