Monitoring PostgreSQL on Win32

A very common question from Win32 users is how to monitor Postgres the same way you can do with ps on Unix. There's a simple trick to it - don't use Task Manager, use Process Explorer from Sysinternals. So why is this. For comparision, here is a snapshot of my laptop with PostgreSQL running, and just a single client connection:

Task Manager screenshot

The same processes, as seen from Process Explorer:

Process Explorer screenshot

The most obvious difference - you can now see the process tree. You will see pg_ctl that is the service manager, that it started the postmaster, and that which subprocesses the postmaster started. You will also see the only second level postgres.exe, which is part of the stats system.

You will also notice in the Handle list, that there is an Event named pgident: .... This event contains the information you would find in the ps output on Unix and identifies the individual PostgreSQL process.

So - simply using a different tool gives you a lot more information. For 8.2 there will be some additional win32 management stuff, but more aobut that somewhere else.


Add comment

New comments can no longer be posted on this entry.

Conferences

I speak at and organize conferences around Open Source in general and PostgreSQL in particular.

Upcoming

PGConf.EU 2025
Oct 21-24, 2025
Riga, Latvia

Past

PGConf.dev 2025
May 13-16, 2025
Montreal, Canada
Nordic PGDay 2025
Mar 18, 2025
Copenhagen, Denmark
SCaLE 2024
Mar 6-9, 2025
Pasadena, USA
FOSDEM PGDay 2025
Jan 30-Feb 2, 2025
Brussels, Belgium
PGConf.EU 2024
Oct 22-25, 2024
Athens, Greece
More past conferences