Re: [HACKERS] replication commands and log_statements

2014-09-12 Thread Fujii Masao
On Wed, Sep 10, 2014 at 7:39 PM, Fujii Masao wrote: > Thanks for reviewing the patch! > > On Wed, Sep 10, 2014 at 4:57 PM, Heikki Linnakangas > wrote: >> On 08/28/2014 11:38 AM, Fujii Masao wrote: >>> >>> On Thu, Jun 19, 2014 at 5:29 PM, Ian Barwick wrote: - minor rewording for the des

Re: [HACKERS] replication commands and log_statements

2014-09-10 Thread Fujii Masao
Thanks for reviewing the patch! On Wed, Sep 10, 2014 at 4:57 PM, Heikki Linnakangas wrote: > On 08/28/2014 11:38 AM, Fujii Masao wrote: >> >> On Thu, Jun 19, 2014 at 5:29 PM, Ian Barwick wrote: >>> >>> - minor rewording for the description, mentioning that statements will >>>still be logged

Re: [HACKERS] replication commands and log_statements

2014-09-10 Thread Heikki Linnakangas
On 08/28/2014 11:38 AM, Fujii Masao wrote: On Thu, Jun 19, 2014 at 5:29 PM, Ian Barwick wrote: - minor rewording for the description, mentioning that statements will still be logged as DEBUG1 even if parameter set to 'off' (might prevent reports of the kind "I set it to 'off', why am I st

Re: [HACKERS] replication commands and log_statements

2014-08-28 Thread Fujii Masao
On Thu, Jun 19, 2014 at 5:29 PM, Ian Barwick wrote: > On 12/06/14 20:37, Fujii Masao wrote: >> >> On Wed, Jun 11, 2014 at 11:55 PM, Tom Lane wrote: >>> >>> Andres Freund writes: Your wish just seems like a separate feature to me. Including replication commands in 'all' seems corre

Re: [HACKERS] replication commands and log_statements

2014-08-27 Thread Robert Haas
On Tue, Aug 26, 2014 at 7:17 AM, Fujii Masao wrote: > On Wed, Aug 20, 2014 at 1:14 PM, Michael Paquier > wrote: >> On Wed, Aug 20, 2014 at 2:06 AM, Robert Haas wrote: >>> >>> On Sat, Aug 16, 2014 at 10:27 AM, Amit Kapila >>> wrote: >>> > I think ideally it would have been better if we could hav

Re: [HACKERS] replication commands and log_statements

2014-08-26 Thread Fujii Masao
On Wed, Aug 20, 2014 at 1:14 PM, Michael Paquier wrote: > > > > On Wed, Aug 20, 2014 at 2:06 AM, Robert Haas wrote: >> >> On Sat, Aug 16, 2014 at 10:27 AM, Amit Kapila >> wrote: >> > I think ideally it would have been better if we could have logged >> > replication commands under separate log_le

Re: [HACKERS] replication commands and log_statements

2014-08-19 Thread Michael Paquier
On Wed, Aug 20, 2014 at 2:06 AM, Robert Haas wrote: > On Sat, Aug 16, 2014 at 10:27 AM, Amit Kapila > wrote: > > I think ideally it would have been better if we could have logged > > replication commands under separate log_level, but as still there > > is no consensus on extending log_statement

Re: [HACKERS] replication commands and log_statements

2014-08-19 Thread Robert Haas
On Sat, Aug 16, 2014 at 10:27 AM, Amit Kapila wrote: > I think ideally it would have been better if we could have logged > replication commands under separate log_level, but as still there > is no consensus on extending log_statement and nobody is even > willing to pursue, it seems okay to go ahea

Re: [HACKERS] replication commands and log_statements

2014-08-16 Thread Amit Kapila
On Thu, Aug 14, 2014 at 7:19 PM, Stephen Frost wrote: > * Amit Kapila (amit.kapil...@gmail.com) wrote: > > On Thu, Aug 14, 2014 at 5:56 AM, Stephen Frost wrote: > > > Regarding this, I'm generally in the camp that says to just include it > > > in 'all' and be done with it- for now. > > > > Okay,

Re: [HACKERS] replication commands and log_statements

2014-08-14 Thread Stephen Frost
Amit, * Amit Kapila (amit.kapil...@gmail.com) wrote: > On Thu, Aug 14, 2014 at 5:56 AM, Stephen Frost wrote: > > Regarding this, I'm generally in the camp that says to just include it > > in 'all' and be done with it- for now. > > Okay, but tomorrow if someone wants to implement a patch to log >

Re: [HACKERS] replication commands and log_statements

2014-08-13 Thread Amit Kapila
On Thu, Aug 14, 2014 at 5:56 AM, Stephen Frost wrote: > * Amit Kapila (amit.kapil...@gmail.com) wrote: > Oh, to be clear- I agree that logging of queries executed through SPI is > desirable; I'd certainly like to have that capability without having to > go through the auto-explain module or write

Re: [HACKERS] replication commands and log_statements

2014-08-13 Thread Michael Paquier
On Thu, Aug 14, 2014 at 10:40 AM, Fujii Masao wrote: > On Thu, Aug 14, 2014 at 9:26 AM, Stephen Frost wrote: >> * Amit Kapila (amit.kapil...@gmail.com) wrote: >>> On Wed, Aug 13, 2014 at 4:24 AM, Stephen Frost wrote: >>> > Not entirely sure what you're referring to as 'internally generated' >>>

Re: [HACKERS] replication commands and log_statements

2014-08-13 Thread Fujii Masao
On Thu, Aug 14, 2014 at 9:26 AM, Stephen Frost wrote: > * Amit Kapila (amit.kapil...@gmail.com) wrote: >> On Wed, Aug 13, 2014 at 4:24 AM, Stephen Frost wrote: >> > Not entirely sure what you're referring to as 'internally generated' >> > here.. >> >> Here 'internally generated' means that user d

Re: [HACKERS] replication commands and log_statements

2014-08-13 Thread Stephen Frost
* Amit Kapila (amit.kapil...@gmail.com) wrote: > On Wed, Aug 13, 2014 at 4:24 AM, Stephen Frost wrote: > > Not entirely sure what you're referring to as 'internally generated' > > here.. > > Here 'internally generated' means that user doesn't execute those > statements, rather the replication/bac

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Amit Kapila
On Wed, Aug 13, 2014 at 4:24 AM, Stephen Frost wrote: > * Bruce Momjian (br...@momjian.us) wrote: > > On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: > > > One difference is that replication commands are internally generated > > > commands. Do we anywhere else log such internally gen

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: > On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: > > On Tue, Aug 12, 2014 at 9:29 AM, Fujii Masao wrote: > > > On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas > > > wrote: > > > > > > > > If you have a user devoted to it, I suppose that's true

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Bruce Momjian
On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: > On Tue, Aug 12, 2014 at 9:29 AM, Fujii Masao wrote: > > On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas wrote: > > > > > > If you have a user devoted to it, I suppose that's true.  I still > > > think it shouldn't get munged together lik

Re: [HACKERS] replication commands and log_statements

2014-08-11 Thread Amit Kapila
On Tue, Aug 12, 2014 at 9:29 AM, Fujii Masao wrote: > On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas wrote: > > > > If you have a user devoted to it, I suppose that's true. I still > > think it shouldn't get munged together like that. > > Why do we need to treat only replication commands as specia

Re: [HACKERS] replication commands and log_statements

2014-08-11 Thread Fujii Masao
On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas wrote: > On Fri, Aug 8, 2014 at 1:04 PM, Fujii Masao wrote: >> On Sat, Aug 9, 2014 at 12:29 AM, Robert Haas wrote: >>> On Fri, Aug 8, 2014 at 11:00 AM, Bruce Momjian wrote: On Fri, Aug 8, 2014 at 08:51:13AM -0400, Robert Haas wrote: > On Th

Re: [HACKERS] replication commands and log_statements

2014-08-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Aug 8, 2014 at 1:04 PM, Fujii Masao wrote: > > You can do that by executing > > "ALTER ROLE SET log_statement TO 'all'". > > If you don't use the replication user to execute SQL statements, > > no SQL statements are logged in that setting. >

Re: [HACKERS] replication commands and log_statements

2014-08-11 Thread Robert Haas
On Fri, Aug 8, 2014 at 1:04 PM, Fujii Masao wrote: > On Sat, Aug 9, 2014 at 12:29 AM, Robert Haas wrote: >> On Fri, Aug 8, 2014 at 11:00 AM, Bruce Momjian wrote: >>> On Fri, Aug 8, 2014 at 08:51:13AM -0400, Robert Haas wrote: On Thu, Aug 7, 2014 at 12:07 PM, Abhijit Menon-Sen wrote:

Re: [HACKERS] replication commands and log_statements

2014-08-08 Thread Fujii Masao
On Sat, Aug 9, 2014 at 12:29 AM, Robert Haas wrote: > On Fri, Aug 8, 2014 at 11:00 AM, Bruce Momjian wrote: >> On Fri, Aug 8, 2014 at 08:51:13AM -0400, Robert Haas wrote: >>> On Thu, Aug 7, 2014 at 12:07 PM, Abhijit Menon-Sen >>> wrote: >>> > At 2014-08-07 23:22:43 +0900, masao.fu...@gmail.com

Re: [HACKERS] replication commands and log_statements

2014-08-08 Thread Robert Haas
On Fri, Aug 8, 2014 at 11:00 AM, Bruce Momjian wrote: > On Fri, Aug 8, 2014 at 08:51:13AM -0400, Robert Haas wrote: >> On Thu, Aug 7, 2014 at 12:07 PM, Abhijit Menon-Sen >> wrote: >> > At 2014-08-07 23:22:43 +0900, masao.fu...@gmail.com wrote: >> >> That is, we log replication commands only whe

Re: [HACKERS] replication commands and log_statements

2014-08-08 Thread Bruce Momjian
On Fri, Aug 8, 2014 at 08:51:13AM -0400, Robert Haas wrote: > On Thu, Aug 7, 2014 at 12:07 PM, Abhijit Menon-Sen > wrote: > > At 2014-08-07 23:22:43 +0900, masao.fu...@gmail.com wrote: > >> That is, we log replication commands only when log_statement is set to > >> all. Neither new parameter is

Re: [HACKERS] replication commands and log_statements

2014-08-08 Thread Robert Haas
On Thu, Aug 7, 2014 at 12:07 PM, Abhijit Menon-Sen wrote: > At 2014-08-07 23:22:43 +0900, masao.fu...@gmail.com wrote: >> That is, we log replication commands only when log_statement is set to >> all. Neither new parameter is introduced nor log_statement is >> redefined as a list. > > That sounds

Re: [HACKERS] replication commands and log_statements

2014-08-07 Thread Abhijit Menon-Sen
At 2014-08-07 23:22:43 +0900, masao.fu...@gmail.com wrote: > > That is, we log replication commands only when log_statement is set to > all. Neither new parameter is introduced nor log_statement is > redefined as a list. That sounds good to me. -- Abhijit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] replication commands and log_statements

2014-08-07 Thread Fujii Masao
On Wed, Jul 2, 2014 at 4:26 AM, Abhijit Menon-Sen wrote: > Hi. > > Do we have any consensus about what to do with these two patches? > > 1. Introduce a "log_replication_command" setting. > 2. Change log_statement to be a list of tokens. > > If I understand correctly, there weren't any strong objec

Re: [HACKERS] replication commands and log_statements

2014-07-01 Thread Abhijit Menon-Sen
Hi. Do we have any consensus about what to do with these two patches? 1. Introduce a "log_replication_command" setting. 2. Change log_statement to be a list of tokens. If I understand correctly, there weren't any strong objections to the former, but the situation is less clear when it comes to t

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 11:15 AM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> Similarly, >> building a logging facility that meets the needs of real users is >> going to require a configuration method more flexible than a total >> order with four choices. I happen to th

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > Similarly, > building a logging facility that meets the needs of real users is > going to require a configuration method more flexible than a total > order with four choices. I happen to think a list of comma-separated > tokens is a pretty good choice

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Robert Haas
On Fri, Jun 20, 2014 at 9:48 AM, Tom Lane wrote: > Fujii Masao writes: >> OK, I've just implemented the patch (attached) which does this, i.e., >> redefines >> log_statement as a list. Thanks to the patch, log_statement can be set >> to "none", >> "ddl", "mod", "dml", "all", and any combinations

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Michael Paquier
On Fri, Jun 20, 2014 at 10:48 PM, Tom Lane wrote: > Fujii Masao writes: >> OK, I've just implemented the patch (attached) which does this, i.e., >> redefines >> log_statement as a list. Thanks to the patch, log_statement can be set >> to "none", >> "ddl", "mod", "dml", "all", and any combination

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Tom Lane
Fujii Masao writes: > OK, I've just implemented the patch (attached) which does this, i.e., > redefines > log_statement as a list. Thanks to the patch, log_statement can be set > to "none", > "ddl", "mod", "dml", "all", and any combinations of them. The meanings of > "none", "ddl", "mod" and "all

Re: [HACKERS] replication commands and log_statements

2014-06-20 Thread Fujii Masao
On Thu, Jun 12, 2014 at 10:55 PM, Robert Haas wrote: > On Wed, Jun 11, 2014 at 7:42 AM, Magnus Hagander wrote: >>> Replication commands like IDENTIFY_COMMAND are not logged even when >>> log_statements is set to all. Some users who use log_statements to >>> audit *all* statements might dislike th

Re: [HACKERS] replication commands and log_statements

2014-06-19 Thread Ian Barwick
On 12/06/14 20:37, Fujii Masao wrote: On Wed, Jun 11, 2014 at 11:55 PM, Tom Lane wrote: Andres Freund writes: Your wish just seems like a separate feature to me. Including replication commands in 'all' seems correct independent of the desire for a more granular control. No, I think I've got

Re: [HACKERS] replication commands and log_statements

2014-06-12 Thread Robert Haas
On Wed, Jun 11, 2014 at 7:42 AM, Magnus Hagander wrote: >> Replication commands like IDENTIFY_COMMAND are not logged even when >> log_statements is set to all. Some users who use log_statements to >> audit *all* statements might dislike this current situation. So I'm >> thinking to change log_stat

Re: [HACKERS] replication commands and log_statements

2014-06-12 Thread Fujii Masao
On Wed, Jun 11, 2014 at 11:55 PM, Tom Lane wrote: > Andres Freund writes: >> Your wish just seems like a separate feature to me. Including >> replication commands in 'all' seems correct independent of the desire >> for a more granular control. > > No, I think I've got to vote with the other side

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Tom Lane
Andres Freund writes: > Your wish just seems like a separate feature to me. Including > replication commands in 'all' seems correct independent of the desire > for a more granular control. No, I think I've got to vote with the other side on that. The reason we can have log_statement as a scalar

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Andres Freund
On 2014-06-11 14:50:34 +0200, Magnus Hagander wrote: > On Wed, Jun 11, 2014 at 2:35 PM, Andres Freund > wrote: > > > On 2014-06-11 14:22:43 +0200, Magnus Hagander wrote: > > > Yes, but how would you specify for example "i want DDL and all > > replication > > > commands" (which is quite a reasonab

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Magnus Hagander
On Wed, Jun 11, 2014 at 2:35 PM, Andres Freund wrote: > On 2014-06-11 14:22:43 +0200, Magnus Hagander wrote: > > Yes, but how would you specify for example "i want DDL and all > replication > > commands" (which is quite a reasonable thing to log, I believe). If you > > actually require it to be s

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Andres Freund
On 2014-06-11 14:22:43 +0200, Magnus Hagander wrote: > Yes, but how would you specify for example "i want DDL and all replication > commands" (which is quite a reasonable thing to log, I believe). If you > actually require it to be set to "all", most people won't have any use at > all for it... Th

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Magnus Hagander
On Wed, Jun 11, 2014 at 2:17 PM, Andres Freund wrote: > On 2014-06-11 13:42:58 +0200, Magnus Hagander wrote: > > On Wed, Jun 11, 2014 at 12:34 PM, Fujii Masao > wrote: > > > > > Hi, > > > > > > Replication commands like IDENTIFY_COMMAND are not logged even when > > > log_statements is set to all

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Andres Freund
On 2014-06-11 13:42:58 +0200, Magnus Hagander wrote: > On Wed, Jun 11, 2014 at 12:34 PM, Fujii Masao wrote: > > > Hi, > > > > Replication commands like IDENTIFY_COMMAND are not logged even when > > log_statements is set to all. Some users who use log_statements to > > audit *all* statements might

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Magnus Hagander
On Wed, Jun 11, 2014 at 12:34 PM, Fujii Masao wrote: > Hi, > > Replication commands like IDENTIFY_COMMAND are not logged even when > log_statements is set to all. Some users who use log_statements to > audit *all* statements might dislike this current situation. So I'm > thinking to change log_st

Re: [HACKERS] replication commands and log_statements

2014-06-11 Thread Andres Freund
On 2014-06-11 19:34:25 +0900, Fujii Masao wrote: > Hi, > > Replication commands like IDENTIFY_COMMAND are not logged even when > log_statements is set to all. Some users who use log_statements to > audit *all* statements might dislike this current situation. So I'm > thinking to change log_stateme

[HACKERS] replication commands and log_statements

2014-06-11 Thread Fujii Masao
Hi, Replication commands like IDENTIFY_COMMAND are not logged even when log_statements is set to all. Some users who use log_statements to audit *all* statements might dislike this current situation. So I'm thinking to change log_statements or add something like log_replication so that we can log