Re: pgsql 8.1 instrumentation status

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: pgsql 8.1 instrumentation status
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9CEC@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на pgsql 8.1 instrumentation status  (Andreas Pflug <pgadmin@pse-consulting.de>)
Ответы Re: pgsql 8.1 instrumentation status
Список pgadmin-hackers

> -----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,

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.

Regards, Dave.



Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: pgsql 8.1 instrumentation status
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: pgsql 8.1 instrumentation status