Skip site navigation (1) Skip section navigation (2)

Re: pgsql 8.1 instrumentation status

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>
Cc: "pgadmin-hackers" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgsql 8.1 instrumentation status
Date: 2005-08-28 22:59:32
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9CEC@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgadmin-hackers
 

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)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.



Attachment: genfile.c.diff
Description: application/octet-stream (1.2 KB)

Responses

pgadmin-hackers by date

Next:From: Andreas PflugDate: 2005-08-29 09:21:09
Subject: Re: pgsql 8.1 instrumentation status
Previous:From: Andreas PflugDate: 2005-08-28 22:02:26
Subject: Re: pgsql 8.1 instrumentation status

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group