Add pid to the pgident event name on win32.
authorMagnus Hagander <magnus@hagander.net>
Thu, 31 Jan 2008 09:21:22 +0000 (09:21 +0000)
committerMagnus Hagander <magnus@hagander.net>
Thu, 31 Jan 2008 09:21:22 +0000 (09:21 +0000)
Should fix a problem where two clusters are running under
two different service accounts and get colliding names,
causing only the first cluster to contain the pgident
event description.

Per report from Stephen Denne.

src/backend/utils/misc/ps_status.c

index 3e1d24cfd538b17847bafa9a9f9bc13c4bb5eed2..ba602cafd9014bbfbd0f1f7969f12457c3dd4def 100644 (file)
@@ -350,7 +350,7 @@ set_ps_display(const char *activity, bool force)
                if (ident_handle != INVALID_HANDLE_VALUE)
                        CloseHandle(ident_handle);
 
-               sprintf(name, "pgident: %s", ps_buffer);
+               sprintf(name, "pgident(%d): %s", MyProcPid, ps_buffer);
 
                ident_handle = CreateEvent(NULL, TRUE, FALSE, name);
        }