Re: Patch for - Allow server logs to be remotely read

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dhanaraj(dot)M(at)Sun(dot)COM, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch for - Allow server logs to be remotely read
Date: 2006-06-08 14:10:14
Message-ID: 200606081410.k58EAE418843@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera wrote:
> Bruce Momjian wrote:
> >
> > Uh, I just added /contrib/adminpack a few weeks ago to CVS, which does
> > this, and more. Sorry I forgot to mark the TODO item as completed.
>
> Huh, how do you read files with adminpack? I only see
>
> Datum pg_file_write(PG_FUNCTION_ARGS);
> Datum pg_file_rename(PG_FUNCTION_ARGS);
> Datum pg_file_unlink(PG_FUNCTION_ARGS);
> Datum pg_logdir_ls(PG_FUNCTION_ARGS);

Uh, README.adminpack shows:

int8 pg_catalog.pg_file_write(fname text, data text, append bool)
int8 pg_catalog.pg_file_read(fname text, data text, append bool)
bool pg_catalog.pg_file_rename(oldname text, newname text)
bool pg_catalog.pg_file_rename(oldname text, newname text, archivname text)
bool pg_catalog.pg_file_unlink(fname text)
bigint pg_catalog.pg_file_size(text)
int4 pg_catalog.pg_logfile_rotate()
setof record pg_catalog.pg_logdir_ls()

Is that wrong? Yes. Looking at the C file, I see what you mean. Let
me update the README.adminpack file. read_file is already in the
backend code, and was in 8.1.X too.

test=> \df *read*
List of functions
Schema | Name | Result data type | Argument data types
------------+--------------+------------------+----------------------
pg_catalog | loread | bytea | integer, integer
pg_catalog | pg_read_file | text | text, bigint, bigint
(2 rows)

The unlink part is part of the adminpack.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-06-08 14:15:14 Re: Patch for - Allow server logs to be remotely read
Previous Message Alvaro Herrera 2006-06-08 14:03:43 Re: Patch for - Allow server logs to be remotely read