|
37 | 37 | *
|
38 | 38 | *
|
39 | 39 | * IDENTIFICATION
|
40 |
| - * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.536 2007/08/02 23:15:26 adunstan Exp $ |
| 40 | + * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.537 2007/08/02 23:39:44 adunstan Exp $ |
41 | 41 | *
|
42 | 42 | * NOTES
|
43 | 43 | *
|
@@ -386,6 +386,8 @@ PostmasterMain(int argc, char *argv[])
|
386 | 386 |
|
387 | 387 | MyProcPid = PostmasterPid = getpid();
|
388 | 388 |
|
| 389 | + MyStartTime = time(NULL); |
| 390 | + |
389 | 391 | IsPostmasterEnvironment = true;
|
390 | 392 |
|
391 | 393 | /*
|
@@ -1103,6 +1105,8 @@ pmdaemonize(void)
|
1103 | 1105 |
|
1104 | 1106 | MyProcPid = PostmasterPid = getpid(); /* reset PID vars to child */
|
1105 | 1107 |
|
| 1108 | + MyStartTime = time(NULL); |
| 1109 | + |
1106 | 1110 | /* GH: If there's no setsid(), we hopefully don't need silent mode.
|
1107 | 1111 | * Until there's a better solution.
|
1108 | 1112 | */
|
@@ -2661,6 +2665,8 @@ BackendStartup(Port *port)
|
2661 | 2665 |
|
2662 | 2666 | MyProcPid = getpid(); /* reset MyProcPid */
|
2663 | 2667 |
|
| 2668 | + MyStartTime = time(NULL); |
| 2669 | + |
2664 | 2670 | /* We don't want the postmaster's proc_exit() handlers */
|
2665 | 2671 | on_exit_reset();
|
2666 | 2672 |
|
@@ -2803,7 +2809,7 @@ BackendInitialize(Port *port)
|
2803 | 2809 |
|
2804 | 2810 | /* save process start time */
|
2805 | 2811 | port->SessionStartTime = GetCurrentTimestamp();
|
2806 |
| - port->session_start = timestamptz_to_time_t(port->SessionStartTime); |
| 2812 | + MyStartTime = timestamptz_to_time_t(port->SessionStartTime); |
2807 | 2813 |
|
2808 | 2814 | /* set these to empty in case they are needed before we set them up */
|
2809 | 2815 | port->remote_host = "";
|
@@ -3385,6 +3391,8 @@ SubPostmasterMain(int argc, char *argv[])
|
3385 | 3391 |
|
3386 | 3392 | MyProcPid = getpid(); /* reset MyProcPid */
|
3387 | 3393 |
|
| 3394 | + MyStartTime = time(NULL); |
| 3395 | + |
3388 | 3396 | /* make sure stderr is in binary mode before anything can
|
3389 | 3397 | * possibly be written to it, in case it's actually the syslogger pipe,
|
3390 | 3398 | * so the pipe chunking protocol isn't disturbed. Non-logpipe data
|
|
0 commit comments