Re: Patch to remove/report orphaned files
От | Bruce Momjian |
---|---|
Тема | Re: Patch to remove/report orphaned files |
Дата | |
Msg-id | 200105251304.f4PD49u00975@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Patch to remove/report orphaned files (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Patch to remove/report orphaned files
|
Список | pgsql-patches |
> Bruce Momjian <pgman@candle.pha.pa.us> writes: > > This patch removes old sort files on postmaster startup, and reports > > orphaned database directory files during database vacuum. > > I like the first part, but not the second. To name just one problem, > it will go berserk after OID wraparound. The "minimum startup OID" I don't see a problem with oid wraparound. The code GetMinStartupOid() initializes with the current oid: + min_oid = ShmemVariableCache->nextOid; The only issue with oid wraparound is that it will not report orphaned files from the last vacuum to the wraparound time, which seems OK. > approach would be ugly even if it weren't fundamentally broken. I don't see why it is broken. > That O(N^2) search will get a tad tedious with a lot of tables, too. Yes, I was going to add a comment about that. Is there a better way, or should I run some timing tests on a very large number of tables to see if the loop is significant compared to the total vacuum time? > I really don't think we have a problem that needs fixing in this area; > surely not a problem bad enough to justify a band-aid as ugly as this. Sorry, I don't see it as that ugly. It was the only way I could think of. We don't know problems we have with orphaned files because we don't detect them now. We know we have left over sort files because people complain about them, so odds are we have these others out there too. Seems we at least have to have some way of detecting them. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-patches по дате отправления: