Stats collection on Windows - Mailing list pgsql-hackers

From Peter Brant
Subject Stats collection on Windows
Date
Msg-id 4432CA82020000BE00002949@gwmta.wicourts.gov
Whole thread Raw
Responses Re: Stats collection on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi all,

I think I've found the cause (or one of the causes) why stats
collection is unreliable on Windows and I'm wondering about the best way
to go about fixing it.

The problem is that process IDs on Windows seem to be assigned without
much rhyme or reason and it seems to happen relatively frequently that a
new process will be assigned the same process ID as a process which
recently died.  If this happens before the backend has been expired out
of pgstat.c's pgStatBeDead hash, the backend will be missed.

I was thinking the postmaster could maintain a backend sequence number
with similar semantics to a UNIXish process ID which could then be used
as the key for pgStatBeDead instead of the actual process ID.  Does that
sound reasonable?

Peter


pgsql-hackers by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: I have changed employers
Next
From: Michael Glaesemann
Date:
Subject: Re: Fixing domain input