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

From Stephen Frost
Subject Re: replication commands and log_statements
Date
Msg-id 20140811180431.GM16422@tamriel.snowman.net
Whole thread Raw
In response to Re: replication commands and log_statements  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Fri, Aug 8, 2014 at 1:04 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> > You can do that by executing
> > "ALTER ROLE <replication user> 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.
>
> If you have a user devoted to it, I suppose that's true.  I still
> think it shouldn't get munged together like that.

Folks *should* have a dedicated replication user, imv.  That said, I
agree with Robert in that I don't particularly like this recommendation
for how to enable logging of replication commands.  For one thing, it
means having to remember to set the per-role GUC for every replication
user which is created and that's the kind of trivially-missed step that
can get people into trouble.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Removing dependency to wsock32.lib when compiling code on WIndows
Next
From: Pavel Stehule
Date:
Subject: Re: psql output change in 9.4