Re: logfile subprocess and Fancy File Functions - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: logfile subprocess and Fancy File Functions
Date
Msg-id 200407242255.i6OMtwJ26035@candle.pha.pa.us
Whole thread Raw
In response to Re: logfile subprocess and Fancy File Functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
OK, let's go with something that is purely log file stuff.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Agreed it should be relative to the log directory, which may or not be
> > under PGDATA, and don't let them go up above it.  Is there any downside
> > to allowing absolute reads as well because COPY can already read
> > absolute files.
>
> Perhaps not from a security point of view, but I think it would be
> rather bizarre for a general-purpose pg_read_file() function to default
> to reading from the log directory.  From the point of view of having
> a consistent API, it'd be better to call the functions something like
> pg_read_logdirectory() and pg_read_logfile() and restrict them to the
> log directory.  If we later decide we want to add a general
> pg_read_file() operation, we won't have to contort its operation to
> preserve compatibility with the log-fetching case.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Function to kill backend
Next
From: Bruce Momjian
Date:
Subject: Re: logfile subprocess and Fancy File Functions