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 42FE150B.3070407@pse-consulting.de
Whole thread Raw
In response to Re: [HACKERS] For review: Server instrumentation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
>
>>Bruce Momjian wrote:
>>
>>>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.
>
>
> The proposed version of pg_logdir_ls could not be called "robust" in any
> way at all, considering that it fails as soon as you modify the log_filename
> pattern.

This is caused by the exposure of log_filename, I never proposed to do
that for good reasons. Any try to interpret it and read files back will
break finally when log_filename is changed at runtime, i.e. it's a
'break me' option by design.

Regards,
Andreas

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [patch 0/7] more patches for pgcrypto
Next
From: Andreas Pflug
Date:
Subject: Re: [HACKERS] For review: Server instrumentation patch