changes to support logging

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: changes to support logging
Date: 2003-08-07 14:26:54
Message-ID: 3F3261AE.5060307@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


To support some of the logging changes I'm working on, I propose to add
the following members to struct Port, unless anyone objects - these are
all calculated in postmaster/postmaster.c:

struct tm session_start;
char * remote_host;
char * remote_port;

Question: In setting these is it better to call strdup() or pstrdup() -
the code comments aren't entirely clear on that.

Another thing:

I've noticed an inconsistency in calls to gettimeofday(): sometimes it
is passed a struct tz (which is ignored) as the second argument, and
sometimes NULL as the second argument. My understanding is that the
second argument is basically useless anyway - on my Linux box man
gettimeofday says this:

The use of the timezone struct is obsolete; the tz_dsttime field has
never been used under Linux - it has not been and will not be supported
by libc or glibc.

I therefore propose to clean this up in the following places:

backend/commands/vacuum.c
backend/utils/adt/nabstime.c
backend/postmaster/postmaster.c (3)

(I know it's a minor nit, but what the heck?)

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-07 14:45:00 Re: changes to support logging
Previous Message Bruce Momjian 2003-08-07 14:13:02 Re: Release changes