From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> |
Cc: | Christoph Berg <myon(at)debian(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to implement pg_current_logfile() function |
Date: | 2016-10-26 05:29:25 |
Message-ID: | 20161026002925.11479d08@slate.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 25 Oct 2016 22:30:48 -0500
"Karl O. Pinc" <kop(at)meme(dot)com> wrote:
> Since pg_log_file may contain only one line, and that
> line may be either the filename of the csv log file or
> the file name of the stderr file name it's impossible
> to tell whether that single file is in csv or stderr
> format. I suppose it might be possible based on file
> name suffix, but Unix expressly ignores file name
> extensions and it seems unwise to force dependence
> on them. Perhaps each line could begin with
> the "type" of the file, either 'csv' or 'stderr'
> followed by a space and the file name?
>
> In other words,
> as long as you're making the content of pg_log_file
> a data structure that contains more than just a single
> file name you may as well make that data structure
> something well-defined, easily parseable in shell, extensible,
> and informative.
While you're at it, it wouldn't hurt to provide another
function that tells you the format of the file returned
by pg_current_logfile(), since pg_current_logfile()
called without arguments could return either a stderr
formatted file or a csvlog formatted file.
Or leave it for the future. Just a thought.
Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2016-10-26 05:30:17 | Re: Unused variable in postgres_fdw/deparse.c |
Previous Message | Amit Langote | 2016-10-26 05:26:14 | Re: Declarative partitioning - another take |