Re: pgsql 8.1 instrumentation status - Mailing list pgadmin-hackers

From Andreas Pflug
Subject Re: pgsql 8.1 instrumentation status
Date
Msg-id 4312D385.5040801@pse-consulting.de
Whole thread Raw
In response to Re: pgsql 8.1 instrumentation status  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgadmin-hackers
Dave Page wrote:

>
>
>
>
>>-----Original Message-----
>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
>>Sent: 28 August 2005 23:02
>>To: Dave Page
>>Cc: pgadmin-hackers
>>Subject: Re: [pgadmin-hackers] pgsql 8.1 instrumentation status
>>
>>
>>
>>>No, just hit that. We knew absolute paths outside the data dir were
>>>going to be rejected, but they seem to have gone further.
>>>
>>>
>>They should be
>>
>>
>>>allow if:
>>>
>>>1) The path starts with $PGDATA
>>>2) The path exactly matches one of the config files.
>>>
>>>
>>logfiles may go somewhere else too.
>>
>>
>
>Yup.
>
>
>
>>>I would call this a bug. If you've got time to produce a
>>>
>>>
>>simple patch,
>>
>>
>>>I'll try to argue it in.
>>>
>>>
>>I won't. A perfectly working and tightly restricted version
>>is available
>>for more than a year now.
>>
>>
>
>Yes, but that wasn't accepted into core exactly as written, and seems to
>have got modified incorrectly at some point (there was no discussion of
>removing the functionality we're missing - I think it's an oversight),
>and will not be going into pgInstaller unless there is absolutely no
>usable alternative. The attached patch should give us the same
>capabilities as we had before. Does it look OK to you before I post it?
>(note that it doesn't try to match the config file names, just dup the
>code we had before).
>
>
>
>>pg_logdir_ls...
>>I won't duplicate pgsql's formatting/interpreting code in pgadmin.
>>
>>
>
>Eh? I still think what you're trying to there is overkill, and limits
>flexibility by forcing the user to use a specific filename format. I
>think we should just look at the log_filename, and use all characters up
>until the first % and from the last % (+1 char) as a pattern match in
>the log directory. Eg,
>
>

I won't implement date interpretation in the client, full stop.
You, as well as all others complaining about pg_logdir_ls, fail to
explain how a query like
select pg_file_unlink(filename) FROM pg_logdir_ls
where filetime < now() - '10 days'::interval
should work reliably. Try it with an alternate implementation, in the
presence of "bizarre filenames"!




>postgresql-%Y-%m-%d_%H%M%S.log gives us a search pattern of
>postgresql-*.log
>
>If anyone is a) mixing logs in one directory and b) using ambiguous
>names for different app logs in that directory, then they deserve any
>bizarre effects they might see *if* they try to view the wrong log. For
>everyone else, name format changes are now possible to suit their needs.
>
>
>
This logfile configuration stuff is a bummer. Anybody who changes it
will probably use his own logfile reader.

I'll be committing a 8.1 version of the admin package soon, which may be
switched over step by step to use core functions if applicable. For
now,  most of them do not deliver the same functionality as present for 8.0.

Regards,
Andreas


pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: pgsql 8.1 instrumentation status
Next
From: "Dave Page"
Date:
Subject: Re: pgsql 8.1 instrumentation status