Re: COPYable logs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: COPYable logs
Date: 2007-08-06 17:42:07
Message-ID: 29607.1186422127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I'm looking at doing #1, but I'm not sure where I can sensibly check
> that redirection is on if cvslog destination is specified. I could check
> when elog() is called, but that seems wasteful. Any ideas?

It's only one extra bool test in elog(), isn't it?

if ((Log_destination & LOG_DESTINATION_CSV) && Redirect_stderr)

Hardly seems worth major contortions to avoid, considering the number of
cycles an elog() call expends anyway.

I thought about adding an assign-hook for Log_destination that forbids
setting the CSV bit unless Redirect_stderr is set, but the trouble with
that is that it's making unsupportable assumptions about the order in
which the GUC variables will be set.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-08-06 17:59:43 Re: COPYable logs
Previous Message Dave Page 2007-08-06 16:15:59 Re: CVS docs referencing externals

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-08-06 17:59:43 Re: COPYable logs
Previous Message Tom Lane 2007-08-05 23:07:21 Re: pg_restore loops forever past EOF for corrupt custom archive files