Re: [HACKERS] WAL: O_DIRECT and multipage-writer (+ memory

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] WAL: O_DIRECT and multipage-writer (+ memory
Дата
Msg-id 200506050340.j553emJ06333@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] WAL: O_DIRECT and multipage-writer (+ memory leak)  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Ответы Re: [HACKERS] WAL: O_DIRECT and multipage-writer (+ memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Memory leak in BootStrapXLOG()  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Список pgsql-patches
ITAGAKI Takahiro wrote:
> Hello everyone.
>
> I fixed two bugs in the patch that I sent before.
> Check and test new one, please.
>
> 1. Fix update timing of Write->curridx. (pointed by Tom)
>      Change to update it soon after write().
>
> 2. Fix buffer alignment routine on 64bit cpu. (pointed by Mark)
>      I checked it on Xeon EM64T and it worked properly, but I don't have IA64...
>
>
> BTW, I found memory leak in BootStrapXLOG(). The buffer allocated by malloc()
> is not free()ed. ISSUE_BOOTSTRAP_MEMORYLEAK in this patch points out it.
> (But this leak is not serious, because this function is called only once.)

Does the following patch fix the memory leak you described?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/access/transam/xlog.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v
retrieving revision 1.195
diff -c -c -r1.195 xlog.c
*** src/backend/access/transam/xlog.c    2 Jun 2005 05:55:28 -0000    1.195
--- src/backend/access/transam/xlog.c    5 Jun 2005 03:38:23 -0000
***************
*** 3754,3759 ****
--- 3754,3760 ----
      BootStrapCLOG();
      BootStrapSUBTRANS();
      BootStrapMultiXact();
+     free(buffer);
  }

  static char *

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] WAL: O_DIRECT and multipage-writer (+
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: [HACKERS] Implementing RESET CONNECTION ...