Re: Cleaning up unreferenced table files - Mailing list pgsql-patches

From Tom Lane
Subject Re: Cleaning up unreferenced table files
Date
Msg-id 29232.1115498259@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cleaning up unreferenced table files  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-patches
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> Maybe we should take a different approach to the problem:
> 1. Create new file with an extension to mark that it's not
>     yet committed (eg. 1234.notcommitted)

This is pushing the problem into the wrong place, viz the lowest-level
file access routines, which will now all have to know about
.notcommitted status.  It also creates race conditions --- think about
backend A trying to commit file 1234 at about the same time that
backend B is trying to flush some dirty buffers belonging to that file.
But most importantly, it doesn't handle the file-deletion case.

            regards, tom lane

pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Cleaning up unreferenced table files
Next
From: Bruce Momjian
Date:
Subject: Dealing with CLUSTER failures