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

2006-06-09 Thread Andreas Pflug
Tom Lane wrote: Bruce Momjian writes: Tom Lane wrote: I wonder if we should take pg_read_file (and the rest of genfile.c) back out of the backend and stick them into contrib/adminpack. I thought about that but what we have in the backend now is read-only which basically could be done usi

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

2006-06-09 Thread Andreas Pflug
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? try select * from pg_logdir_ls() as (filetime timestamp, filena

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

2006-06-08 Thread Dhanaraj M
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. --- 1. int8 pg_catalog.pg_file_read(fname text, data text

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

2006-06-08 Thread Andrew Dunstan
Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian writes: Tom Lane wrote: I wonder if we should take pg_read_file (and the rest of genfile.c) back out of the backend and stick them into contrib/adminpack. I thought about that but what we have in the backend now is re

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

2006-06-08 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> I wonder if we should take pg_read_file (and the rest of genfile.c) > >> back out of the backend and stick them into contrib/adminpack. > > > I thought about that but what we have in the backend now is read-only > > which basically

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

2006-06-08 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> I wonder if we should take pg_read_file (and the rest of genfile.c) >> back out of the backend and stick them into contrib/adminpack. > I thought about that but what we have in the backend now is read-only > which basically could be done using COPY, so I

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

2006-06-08 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > 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. > > I wonder if we should take pg_read_file (and the rest of genfile.c)

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

2006-06-08 Thread Tom Lane
Bruce Momjian writes: > 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. I wonder if we should take pg_read_file (and the rest of genfile.c) back out of the backend and

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

2006-06-08 Thread Bruce Momjian
Bruce Momjian wrote: > 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 > > >

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

2006-06-08 Thread Bruce Momjian
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)

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

2006-06-08 Thread Alvaro Herrera
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_ARG

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

2006-06-08 Thread Bruce Momjian
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. --- Dhanaraj M wrote: > The patch is attached for the following TODO item: > > *Allo

[PATCHES] Patch for - Allow server logs to be remotely read

2006-06-08 Thread Dhanaraj M
The patch is attached for the following TODO item: *Allow server logs to be remotely read. Steps: 1. When the server starts (**pg_ctl start)**, the path of the postmaster file is stored 2. The user can access the logfile using the following 2 functions: * pg_file_readlog(int linenumber) -