Re: optimizing CleanupTempFiles
От | Heikki Linnakangas |
---|---|
Тема | Re: optimizing CleanupTempFiles |
Дата | |
Msg-id | 48D1F3CC.2040001@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: optimizing CleanupTempFiles (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: optimizing CleanupTempFiles
Re: optimizing CleanupTempFiles |
Список | pgsql-hackers |
Tom Lane wrote: > Alvaro Herrera <alvherre@commandprompt.com> writes: >> BTW in testing this patch I was surprised by the fact that temp tables >> files are removed at checkpoint time, > > [ blink... ] Doesn't look like that should happen. What is your > test case? Hmph, must be because of the patch from last winter to prevent relfilenode reuse until next checkpoint. Looks like we didn't make an exception for temporary tables. Although it's harmless, we could put an isTempOrToastNamespace() test in there: *** md.c 11 Aug 2008 11:05:11 -0000 1.139 --- md.c 18 Sep 2008 06:22:13 -0000 *************** *** 19,24 **** --- 19,25 ---- #include <sys/file.h> #include "catalog/catalog.h" + #include "catalog/namespace.h" #include "miscadmin.h" #include "postmaster/bgwriter.h" #include "storage/fd.h" *************** *** 324,330 **** /* * Delete or truncate the first segment. */ ! if (isRedo || forkNum != MAIN_FORKNUM) ret = unlink(path); else { --- 325,331 ---- /* * Delete or truncate the first segment. */ ! if (isRedo || forkNum != MAIN_FORKNUM || isTempOrToastNamespace(rnode.spcNode)) ret = unlink(path); else { -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: