Re: [HACKERS] get current log file

2016-02-29 Thread Armor
obert Haas";; Date: Fri, Feb 26, 2016 07:33 PM To: "Armor"; Cc: "Tom Lane"; "Euler Taveira"; "Alvaro Herrera"; "pgsql-hackers"; Subject: Re: [HACKERS] get current log file On Fri, Feb 26, 2016 at 8:31 AM, Armor wrote: > I think I

Re: [HACKERS] get current log file

2016-02-26 Thread Armor
veira"; "Armor"; "Alvaro Herrera"; "Pgsql Hackers"; Subject: Re: [HACKERS] get current log file Robert Haas writes: > On Thu, Feb 25, 2016 at 1:15 AM, Euler Taveira >> wrote: >>> To pass last_syslogger_file_time, we have 2 solutions: 1

Re: [HACKERS] get current log file

2016-02-26 Thread Tom Lane
Euler Taveira writes: > Those are good concerns. Also, we already have emit_log_hook that could > grab server log messages. A small extension using the hook (there are > some out there) could be use with a log consuming tool. Hmmm ... emit_log_hook runs in the process calling elog, no? That woul

Re: [HACKERS] get current log file

2016-02-26 Thread Euler Taveira
On 26-02-2016 11:50, Tom Lane wrote: > This needs to be explained a lot more clearly than it has been so far, > else we are going to reject this proposed feature as being more code and > more overhead than is justified. Exactly why would you need a pointer to > the current log file, rather than ju

Re: [HACKERS] get current log file

2016-02-26 Thread Tom Lane
Euler Taveira writes: > On 26-02-2016 08:03, Robert Haas wrote: >> But there's one thing I'm slightly baffled about: why would you >> actually need this? > The use case I have in mind is consume log file by using a tool like > logstash. In this case, logstash accepts patterns and you can also use

Re: [HACKERS] get current log file

2016-02-26 Thread Euler Taveira
On 26-02-2016 08:03, Robert Haas wrote: > I don't think we're going to accept this feature if it might fail in > corner cases. And that design seems awfully complex. > Agree. > The obvious way to implement this, to me at least, seems to be for the > syslogger to write a file someplace in the dat

Re: [HACKERS] get current log file

2016-02-26 Thread Robert Haas
On Fri, Feb 26, 2016 at 8:31 AM, Armor wrote: > I think I know what you are concerned about. May be I did not explain my > solution very clearly. > (i) Using a variable named last_syslogger_file_time replace > first_syslogger_file_time in syslogger.c. When postmaster initialize logger > process,

Re: [HACKERS] get current log file

2016-02-25 Thread Tom Lane
Robert Haas writes: > On Thu, Feb 25, 2016 at 1:15 AM, Euler Taveira >> wrote: >>> To pass last_syslogger_file_time, we have 2 solutions: 1, add a >>> global variable to record last_syslogger_file_time which shared by >>> backends and syslogger, so backends can get last_syslogger_file_time >>> ver

Re: [HACKERS] get current log file

2016-02-24 Thread Robert Haas
On Thu, Feb 25, 2016 at 1:15 AM, Euler Taveira wrote: > On 02-02-2016 10:22, Armor wrote: >> As we known, the name of current log file depends on the number of >> seconds (for simple, later I will call it last_syslogger_file_time) >> since Epoch when create new log file. So, for this feature,

Re: [HACKERS] get current log file

2016-02-24 Thread Euler Taveira
On 02-02-2016 10:22, Armor wrote: > As we known, the name of current log file depends on the number of > seconds (for simple, later I will call it last_syslogger_file_time) > since Epoch when create new log file. So, for this feature, the key is > how syslogger process pass last_syslogger_file

Re: [HACKERS] get current log file

2016-02-24 Thread Armor
. -- Jerry Yu -- Original -- From: "Alvaro Herrera";; Date: Tue, Feb 2, 2016 06:30 PM To: "Armor"; Cc: "pgsql-hackers"; Subject: Re: [HACKERS] get current log file Armor wrote: > Hello, > > &g

Fw: Re: [HACKERS] get current log file

2016-02-24 Thread Armor
ou have any question, please let me know. -- Jerry Yu -- Original -- From: "Alvaro Herrera";; Date: Tue, Feb 2, 2016 06:30 PM To: "Armor"; Cc: "pgsql-hackers"; Subject: Re: [HACKERS] get current log file

Re: [HACKERS] get current log file

2016-02-02 Thread Alvaro Herrera
Armor wrote: > Hello, > > > I find there is a new feature about getting current log file name on the > TODO list (for detail please check > http://www.postgresql.org/message-id/pine.gso.4.64.0811101325260.9...@westnet.com). > On the other side, we finish a ticket to this requirement for ou

[HACKERS] get current log file

2016-02-02 Thread Armor
Hello, I find there is a new feature about getting current log file name on the TODO list (for detail please check http://www.postgresql.org/message-id/pine.gso.4.64.0811101325260.9...@westnet.com). On the other side, we finish a ticket to this requirement for our customer. If the PG