Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-06-27 Thread Heikki Linnakangas
No, not for now. Maybe for 8.2. And maybe as a contrib tool at first after all. - Heikki On Mon, 27 Jun 2005, Bruce Momjian wrote: Heikki, do you have any interest in completing your file checking patch for inclusion in 8.1 by adding tablespace information and other fixes as requested by Tom

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-06-27 Thread Bruce Momjian
Heikki, do you have any interest in completing your file checking patch for inclusion in 8.1 by adding tablespace information and other fixes as requested by Tom below? The current patch version is at: ftp://candle.pha.pa.us/pub/postgresql/mypatches called checkfiles*. Anyone else want

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-11 Thread Bruce Momjian
Tom Lane wrote: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > On Tue, 10 May 2005, Bruce Momjian wrote: > >> The current code is nice and localized and doesn't add any burden on our > >> existing code, which is already complicated enough. I think we either > >> fix checkfiles.c, or we remov

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > On Tue, 10 May 2005, Bruce Momjian wrote: >> The current code is nice and localized and doesn't add any burden on our >> existing code, which is already complicated enough. I think we either >> fix checkfiles.c, or we remove it and decide it isn't w

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Bruce Momjian
Heikki Linnakangas wrote: > On Tue, 10 May 2005, Bruce Momjian wrote: > > > The current code is nice and localized and doesn't add any burden on our > > existing code, which is already complicated enough. I think we either > > fix checkfiles.c, or we remove it and decide it isn't worth checking f

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Heikki Linnakangas
On Tue, 10 May 2005, Bruce Momjian wrote: The current code is nice and localized and doesn't add any burden on our existing code, which is already complicated enough. I think we either fix checkfiles.c, or we remove it and decide it isn't worth checking for unrefrenced files. Let's pull the patch

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > On Sun, 8 May 2005, Tom Lane wrote: >> While your original patch is buggy, it's at least fixable and has >> localized, limited impact. I don't think these schemes are safe >> at all --- they put a great deal more weight on the semantics of >> the fi

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Bruce Momjian
Heikki Linnakangas wrote: > On Sun, 8 May 2005, Tom Lane wrote: > > > While your original patch is buggy, it's at least fixable and has > > localized, limited impact. I don't think these schemes are safe > > at all --- they put a great deal more weight on the semantics of > > the filesystem than

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-10 Thread Heikki Linnakangas
On Sun, 8 May 2005, Tom Lane wrote: While your original patch is buggy, it's at least fixable and has localized, limited impact. I don't think these schemes are safe at all --- they put a great deal more weight on the semantics of the filesystem than I care to do. I'm going to try this some more,

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> [ shrug ] It's still broken, and the reason is that there's no >> equivalent of fsync for directory operations. Consider > Traditionally that's because directory operations were always > synchronous, and hence didn'

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > Consider the variant with extra marker files. In that case, backend B > > doesn't have to know about the .notcommitted status to flush the buffers. > > [ shrug ] It's still broken, and the reason is that t

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Consider the variant with extra marker files. In that case, backend B > doesn't have to know about the .notcommitted status to flush the buffers. [ shrug ] It's still broken, and the reason is that there's no equivalent of fsync for directory oper

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Heikki Linnakangas
On Sat, 7 May 2005, Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> 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

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-07 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> 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 rou

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-07 Thread Heikki Linnakangas
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) 2. ... 3. Take CheckpointStartLock 4. Write commit record to WAL, with list of created files. 5. rename created file (1234.notcommitted -> 12