From a43ea120bf7539232d9f41a3bf7f7986fde84837 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Aug 2005 18:23:56 +0000 Subject: Code & docs review for server instrumentation patch. File timestamps should surely be timestamptz not timestamp; fix some but not all of the holes in check_and_make_absolute(); other minor cleanup. Also put in the missed catversion bump. --- src/backend/utils/adt/misc.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'src/backend/utils/adt/misc.c') diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index 40b4c64cd12..9200a7c227e 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.46 2005/08/12 03:24:08 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.47 2005/08/12 18:23:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -18,26 +18,19 @@ #include #include +#include "catalog/pg_tablespace.h" +#include "catalog/pg_type.h" #include "commands/dbcommands.h" +#include "funcapi.h" #include "miscadmin.h" -#include "storage/procarray.h" -#include "storage/pmsignal.h" +#include "postmaster/syslogger.h" #include "storage/fd.h" +#include "storage/pmsignal.h" +#include "storage/procarray.h" #include "utils/builtins.h" -#include "utils/elog.h" -#include "funcapi.h" -#include "catalog/pg_type.h" -#include "catalog/pg_tablespace.h" -#include "postmaster/syslogger.h" #define atooid(x) ((Oid) strtoul((x), NULL, 10)) -typedef struct -{ - char *location; - DIR *dirdesc; -} directory_fctx; - /* * Check if data is Null @@ -150,15 +143,15 @@ pg_rotate_logfile(PG_FUNCTION_ARGS) if (!Redirect_stderr) { - ereport(NOTICE, - (errcode(ERRCODE_WARNING), - errmsg("no logfile configured; rotation not supported"))); + ereport(WARNING, + (errmsg("rotation not possible because log redirection not active"))); + PG_RETURN_INT32(0); } SendPostmasterSignal(PMSIGNAL_ROTATE_LOGFILE); - PG_RETURN_INT32(0); + PG_RETURN_INT32(1); } #ifdef NOT_USED -- cgit v1.2.3