Re: [HACKERS] For review: Server instrumentation patch - Mailing list pgsql-patches

From Andreas Pflug
Subject Re: [HACKERS] For review: Server instrumentation patch
Date
Msg-id 42FD39E4.4030801@pse-consulting.de
Whole thread Raw
In response to Re: [HACKERS] For review: Server instrumentation patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] For review: Server instrumentation patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [HACKERS] For review: Server instrumentation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Bruce Momjian wrote:

>
>
> I don't see how listing the log files relates to editing the confuration
> files.

Both are remote administration. While we've seen the discussion that one
aspect (config file editing) should be performed in psql, you assume the
other aspect (viewing the logfile) to be not interesting. Your
argumentation doesn't seem consequent to me.

>>>it would be something done in C or another application language.  Aren't
>>>the file names already ordered based on their file names, given the
>>>default pattern, postgresql-%Y-%m-%d_%H%M%S.log?
>>
>>The issue is _filtering_, not ordering. Since the log directory might be
>>directed to a different location, non-pgsql logfiles might be there too.
>>You'd probably won't expect to retrieve these files over a pgsql connection.
>
>
> Well, if they mix log files and non-log files in the same directory, we
> would have to filter based on the log_filename directive in the
> application, or use LIKE in a query.

.. which is what pg_logdir_ls does. And it's robust against filenames
that don't have valid dates too; imagine postgresql-2005-01-01_crash1.log.

Regards,
Andreas



pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] For review: Server instrumentation patch
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] For review: Server instrumentation patch