> >> Hmm.  Maybe the WAL redo is messing things up??
> 
> > It could mess up pg_class content, but it never deletes
> > files (currently).
> 
> I'm not convinced that any files have really been deleted.  Maybe it's
> just that the pg_class entries are wrong, or even more likely that the
> indexes on pg_class are messed up (pointing at the wrong 
> pg_class rows).

1. Indices could be recreated with REINDEX or pg_class could be queried
with seq scan (something like where relname like '%seq_i___data_buffer%')...
Konstantin?

2. While trying to reproduce this case (without success yet) I've noticed
that in the event of crash just after creation sequence would miss
magic number and so nextval would abort. Fixed. Looks like not related
to reported problem, though.

3. Could you help us reproduce this bug, Konstantin?
What exactly did you do after sequence creation?
Does your function reference temp table you've mentioned?
What cause crash? Maybe crash is related somehow...
Could you try to reproduce failure with wal_debug = 1 and
post me postmaster' log?

Regards,
Vadim

Tue, 3 Apr 2001 16:36:48 -0700 
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
RE: [BUGS] Loosing files after backend crash 