Re: Stats collection on Windows

Поиск
Список
Период
Сортировка
От stephen joseph butler
Тема Re: Stats collection on Windows
Дата
Msg-id f107df20604050742j1a158b2fh5f60d0427b9c3384@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Stats collection on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2006/4/5, Tom Lane <tgl@sss.pgh.pa.us>:
AFAICS, don't-reuse-PIDs-too-quick has exact analogs that Windows has
to solve by ensuring it doesn't reuse HANDLEs too quick.


There's a disconnect here. handles aren't process identifiers: they're reference counted "pointers" to the kernel structures for the process. If you are holding a handle (ie: from CreateProcess or OpenProcess) that handle cannot and will not be reclaimed until you call CloseHandle (or your process itself exits). You should never retain a handle after you've called CloseHandle on it.

Which brings an interesting thought: are process ID's reclaimed while open handles remain? I'm willing to bet the answer is no. In that case, the stats collector could retain the handle until it's done with the process ID.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Tru64/Alpha problems
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Stats collection on Windows