Re: 8.1.3 and unused files - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: 8.1.3 and unused files
Date
Msg-id 1146853564.8325.50.camel@home
Whole thread Raw
In response to Re: 8.1.3 and unused files  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 8.1.3 and unused files
List pgsql-hackers
On Fri, 2006-05-05 at 14:09 -0400, Tom Lane wrote:
> Rod Taylor <pg@rbt.ca> writes:
> > Am I correct in the thought that the various files listed below are not
> > used by the database and can be safely removed? There were no other
> > active db connections when I issued this command.
> 
> > I think truncate (Slony) left them behind.
> 
> I don't particularly like the casual assumption that truncate is broken.

> If I were you I'd be looking harder for a plausible explanation about
> where these files came from, especially seeing how large they are.
> Have you tried dumping the file contents to see if the data looks
> recognizable at all?

Hardware is perfectly functional and has been for about 18 months in
production with 8.0.x.

It is a completely new 8.1 database and Slony is the only entity that
has been working in it. There are not very many possibilities.


I'm fairly confident I know exactly which table they are/were a part of.
1434984 is the table data, 1434986 is the primary key of the table (only
index), and 1434985 is probably the toast structure.

The structure have different relfilenode values and valid data at this
time.

At some point it must have failed in copying the data across, aborted,
and restarted.


So it would have been something like this:

BEGIN; 
TRUNCATE; 
"decouple indexes -- ask Jan"; 
COPY; 
"recouple indexes"; 
REINDEX <crash, abort, something else to cause a Slony to restart>;

<reconnect>
BEGIN; 
TRUNCATE; 
"decouple indexes -- ask Jan"; 
COPY; "recouple indexes"; 
REINDEX;
COMMIT;

-- 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 8.1.3 and unused files
Next
From: Tom Lane
Date:
Subject: Re: 8.1.3 and unused files