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

Patch for - Allow server logs to be remotely read

From: Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>
To: pgsql-patches(at)postgresql(dot)org
Subject: Patch for - Allow server logs to be remotely read
Date: 2006-06-08 13:24:08
Message-ID: 448824F8.50706@sun.com (view raw or flat)
Thread:
Lists: pgsql-patches
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) -  Retrieves the string for the given line number
   * **pg_file_countlog() -  Retrieves the number of lines existing in the logfile*



I have implemented this based on the suggestions given in the hackers mailing list.
If you know a better way, please share it with me. Waiting for your reply.


Thanks
Dhanaraj


Attachment: logfile_read.patch
Description: text/x-patch (5.6 KB)

Responses

pgsql-patches by date

Next:From: Andrew DunstanDate: 2006-06-08 13:43:19
Subject: Re: [HACKERS] drop if exists remainder
Previous:From: Qingqing ZhouDate: 2006-06-08 03:14:15
Subject: Re: remove lock protection on HeapTupleSatisfiesVacuum

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