Re: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc
Дата
Msg-id 199905100058.JAA00486@ext16.sra.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> > Possible solutions might be:
> > (1) do a context switching in lo_read/lo_write
> 
> I agree with this, but I worry a little bit about memory leakage,
> because anything allocated in GlobalMemoryContext is not going to get
> cleaned up automatically.  If lo_read/lo_write call any code that is
> sloppy about pfree'ing everything it palloc's, then you'd have a
> long-term leakage that would eventually make the backend run out of
> memory.  But it'd be easy enough to test for that, if you have a test
> app that can run the backend through a lot of LO calls.

Yes, I thought about that too. Maybe we could destroy the
GlobalMemoryContext in lo_close() if no LO descriptor exists any more.
Of course this would not prevent the memory leakage if a user forget
to call lo_close, but it's of the user's responsibility anyway.
---
Tatsuo Ishii


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] parser enhancement request for 6.5
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] vacuum slowness