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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Patch for - Allow server logs to be remotely read
Дата
Msg-id 200606081410.k58EAE418843@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Patch for - Allow server logs to be remotely read  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Patch for - Allow server logs to be remotely read  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Patch for - Allow server logs to be remotely read  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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. +

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Patch for - Allow server logs to be remotely read
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch for - Allow server logs to be remotely read