Re: replication commands and log_statements - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: replication commands and log_statements
Date
Msg-id CAHGQGwFA2g6TKOoA-Owfhb2YVmxX_+RzHxy8hnhFJsdALbxTkw@mail.gmail.com
Whole thread Raw
In response to Re: replication commands and log_statements  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Responses Re: replication commands and log_statements
List pgsql-hackers
On Wed, Jul 2, 2014 at 4:26 AM, Abhijit Menon-Sen <ams@2ndquadrant.com> 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 objections to the
> former, but the situation is less clear when it comes to the second.

On second thought, I'd like to propose the third option. This is the same idea
as Andres suggested upthread. 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.

Firstly, since log_statement=all means that all statements are logged, it's
basically natural and intuitive to log even replication commands in that
setting. Secondly, any statements except DDL and data-modifying statements,
e.g., VACUUM, CHECKPOINT, BEGIN, ..etc, are logged only when log_statement=all.
So even if some users want to control the logging of DDL and maintenance
commands orthogonally, which is impossible for now. Therefore, even if the
logging of replication commands which are neither DDL nor data-modifying
statements also cannot be controlled orthogonally, I don't think that users
get so surprised. Of course I have no objection to address the issue by, e.g.,
enabling such orthogonal logging control, in the future, though.

Thought? What about introducing that simple but not so confusing change first?

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: delta relations in AFTER triggers
Next
From: Merlin Moncure
Date:
Subject: Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?