pgsql: Add GUC to enable logging of replication commands.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add GUC to enable logging of replication commands.
Date: 2014-09-12 17:56:59
Message-ID: E1XSV5f-00054T-5i@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add GUC to enable logging of replication commands.

Previously replication commands like IDENTIFY_COMMAND were not logged
even when log_statements is set to all. Some users who want to audit
all types of statements were not satisfied with this situation. To
address the problem, this commit adds new GUC log_replication_commands.
If it's enabled, all replication commands are logged in the server log.

There are many ways to allow us to enable that logging. For example,
we can extend log_statement so that replication commands are logged
when it's set to all. But per discussion in the community, we reached
the consensus to add separate GUC for that.

Reviewed by Ian Barwick, Robert Haas and Heikki Linnakangas.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4ad2a548050fdde07fed93e6c60a4d0a7eba0622

Modified Files
--------------
doc/src/sgml/config.sgml | 16 ++++++++++++++++
doc/src/sgml/protocol.sgml | 2 ++
src/backend/replication/walsender.c | 11 +++++++++--
src/backend/utils/misc/guc.c | 9 +++++++++
src/backend/utils/misc/postgresql.conf.sample | 1 +
src/include/replication/walsender.h | 1 +
6 files changed, 38 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-09-12 20:22:54 pgsql: Change NTUP_PER_BUCKET to 1 to improve hash join lookup speed.
Previous Message Stephen Frost 2014-09-12 16:08:28 pgsql: Add unicode_{column|header|border}_style to psql