Re: replication commands and log_statements

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: replication commands and log_statements
Date: 2014-08-11 18:04:31
Message-ID: 20140811180431.GM16422@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> On Fri, Aug 8, 2014 at 1:04 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-08-11 18:22:46 Re: psql output change in 9.4
Previous Message Jeff Janes 2014-08-11 18:02:48 Re: Removing dependency to wsock32.lib when compiling code on WIndows