diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 18:23:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-12 18:23:56 +0000 |
commit | a43ea120bf7539232d9f41a3bf7f7986fde84837 (patch) | |
tree | d273c2bf155291a526c6b9c8700ab7803359ae36 /src/backend/utils/adt/misc.c | |
parent | cb29f669b0b67b82f1f5422b3aaf0f54ac5d20ee (diff) | |
download | postgresql-a43ea120bf7539232d9f41a3bf7f7986fde84837.tar.gz postgresql-a43ea120bf7539232d9f41a3bf7f7986fde84837.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/misc.c')
-rw-r--r-- | src/backend/utils/adt/misc.c | 29 |
1 files changed, 11 insertions, 18 deletions
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 <signal.h> #include <dirent.h> +#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 |