possible bug: orphaned files left after immediate shutdown during DDL - Mailing list pgsql-bugs

From Jeff Davis
Subject possible bug: orphaned files left after immediate shutdown during DDL
Date
Msg-id 1297309026.11375.7.camel@jdavis-ux.asterdata.local
Whole thread Raw
Responses Re: possible bug: orphaned files left after immediate shutdown during DDL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Case:

  BEGIN;
  CREATE TABLE foo AS SELECT generate_series(1,1000);
  CHECKPOINT;
  SELECT relfilenode FROM pg_class WHERE relname='foo';

Let's say that returns 23456. Send the postmaster a SIGQUIT (immediate
shutdown), and then restart. The file 23456 is still in the filesystem,
but there's no record in pg_class for it. I don't see any obvious path
where it will be removed, so it looks like it will just stay there
forever.

My question is: is this a conscious decision to be paranoid during
recovery, or is this a bug? Or is there some reason that properly
determining which files should be removed at recovery time is
challenging?

Regards,
    Jeff Davis

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [Fwd: ERROR: cannot extract system attribute from minimal tuple]
Next
From: Tom Lane
Date:
Subject: Re: [Fwd: ERROR: cannot extract system attribute from minimal tuple]