Add pid to the pgident event name on win32.
authorMagnus Hagander <[email protected]>
Thu, 31 Jan 2008 09:21:22 +0000 (09:21 +0000)
committerMagnus Hagander <[email protected]>
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 337bab9f1686024e70b0df9aa3ffef1f4c98db19..b7fdf4f020704e5405cfed7dcf694817dbf430db 100644 (file)
@@ -346,7 +346,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);
        }