files were last loaded.
George Gensure
-
+
Functions and Operators
server start time
+ |
+ pg_conf_load_time()
+ timestamp with time zone
+ configuration load time
+
+
|
session_user
name
- pg_postmaster_start_time returns the
- timestamp with time zone when the
- server started.
+ pg_postmaster_start_time returns the
+ timestamp with time zone when the
+ server started.
+
+
+
+
+
+ pg_conf_load_time returns the
+ timestamp with time zone when the
+ server configuration files were last loaded.
+ (If the current session was alive at the time, this will be the time
+ when the session itself re-read the configuration files, so the
+ reading will vary a little in different sessions. Otherwise it is
+ the time when the postmaster process re-read the configuration files.)
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.556 2008/04/26 22:47:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.557 2008/05/04 21:13:35 tgl Exp $
*
* NOTES
*
InheritableSocket pgStatSock;
pid_t PostmasterPid;
TimestampTz PgStartTime;
+ TimestampTz PgReloadTime;
bool redirection_done;
#ifdef WIN32
HANDLE PostmasterHandle;
param->PostmasterPid = PostmasterPid;
param->PgStartTime = PgStartTime;
+ param->PgReloadTime = PgReloadTime;
param->redirection_done = redirection_done;
PostmasterPid = param->PostmasterPid;
PgStartTime = param->PgStartTime;
+ PgReloadTime = param->PgReloadTime;
redirection_done = param->redirection_done;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.187 2008/03/25 22:42:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.188 2008/05/04 21:13:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* Set at postmaster start */
TimestampTz PgStartTime;
+/* Set at configuration reload */
+TimestampTz PgReloadTime;
static TimeOffset time2t(const int hour, const int min, const int sec, const fsec_t fsec);
}
Datum
-pgsql_postmaster_start_time(PG_FUNCTION_ARGS)
+pg_postmaster_start_time(PG_FUNCTION_ARGS)
{
PG_RETURN_TIMESTAMPTZ(PgStartTime);
}
+Datum
+pg_conf_load_time(PG_FUNCTION_ARGS)
+{
+ PG_RETURN_TIMESTAMPTZ(PgReloadTime);
+}
+
/*
* GetCurrentTimestamp -- get the current operating system time
*
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.53 2008/01/01 19:45:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.54 2008/05/04 21:13:35 tgl Exp $
*/
%{
PGC_S_FILE, GUC_ACTION_SET, true);
}
+ /* Remember when we last successfully loaded the config file. */
+ PgReloadTime = GetCurrentTimestamp();
+
cleanup_list:
free_name_value_list(head);
if (cvc)
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.453 2008/04/29 14:59:17 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.454 2008/05/04 21:13:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200804292
+#define CATALOG_VERSION_NO 200805041
#endif
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.494 2008/04/29 13:00:22 alvherre Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.495 2008/05/04 21:13:36 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
DESCR("current value from last used sequence");
/* start time function */
-DATA(insert OID = 2560 ( pg_postmaster_start_time PGNSP PGUID 12 1 0 f f t f s 0 1184 "" _null_ _null_ _null_ pgsql_postmaster_start_time - _null_ _null_ ));
+DATA(insert OID = 2560 ( pg_postmaster_start_time PGNSP PGUID 12 1 0 f f t f s 0 1184 "" _null_ _null_ _null_ pg_postmaster_start_time - _null_ _null_ ));
DESCR("postmaster start time");
+/* config reload time function */
+DATA(insert OID = 2034 ( pg_conf_load_time PGNSP PGUID 12 1 0 f f t f s 0 1184 "" _null_ _null_ _null_ pg_conf_load_time - _null_ _null_ ));
+DESCR("configuration load time");
/* new functions for Y-direction rtree opclasses */
DATA(insert OID = 2562 ( box_below PGNSP PGUID 12 1 0 f f t f i 2 16 "603 603" _null_ _null_ _null_ box_below - _null_ _null_ ));
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.76 2008/03/21 01:31:43 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.77 2008/05/04 21:13:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/* Set at postmaster start */
extern TimestampTz PgStartTime;
+/* Set at configuration reload */
+extern TimestampTz PgReloadTime;
/*
extern Datum statement_timestamp(PG_FUNCTION_ARGS);
extern Datum clock_timestamp(PG_FUNCTION_ARGS);
-extern Datum pgsql_postmaster_start_time(PG_FUNCTION_ARGS);
+extern Datum pg_postmaster_start_time(PG_FUNCTION_ARGS);
+extern Datum pg_conf_load_time(PG_FUNCTION_ARGS);
/* Internal routines (not fmgr-callable) */