Re: Stats collection on Windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, mark(at)mark(dot)mielke(dot)cc, "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Stats collection on Windows
Date: 2006-04-05 14:05:56
Message-ID: 27481.1144245956@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>> HANDLE is process local? That is worse then, because then
>> there's no guarentee that each process will see a different
>> identifier.

> HANDLE is process local. What you need to do is run DuplicateHandle() on
> it specifying it should "also be valid for process Y" (for which you
> need a HANDLE opened, in this case the stats collector). This will give
> you a new handle whichi s valid in the *target process*, but it is *not*
> valid in your own process.

What happens if process Y goes away between the time you obtain a
handle for it and the time you try to run this DuplicateHandle call?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-04-05 14:07:11 Re: Tru64/Alpha problems
Previous Message Pavel Stehule 2006-04-05 11:22:37 commit callback, request