Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
Date
Msg-id 1295453105.3282.10341.camel@ebony
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on  (Florian Pflug <fgp@phlo.org>)
Responses Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
List pgsql-hackers
On Wed, 2011-01-19 at 16:42 +0100, Florian Pflug wrote:
> 
> Could you explain the failure condition you do have in mind where
> logging replication connections unconditionally is beneficial? 

Sure. 

Replication drops and immediately reconnects during night.
When did that happen? How many times did it happen? For how long did the
disconnection last? Why did it happen? How does that correlate with
other situations? That info is not available easily.

pg_stat_replication is necessary, and is separate from pg_stat_activity
because replication connections are not the same as normal connections.
We even have a separate permission for replication, to further
demonstrate that.

Replication connections being logged differently from normal connections
was not an anomaly, nor was it wasteful. By treating them the same we
are forced to log too much, instead of just enough.

Replication connections are not even logged unconditionally. You need to
enable replication before they appear in the log. And that is exactly
the time the log entries are helpful.

The question we should have asked is "Why is removing those log entries
helpful?". I shouldn't have to justify putting something back, when the
good reason for its existence was previously explained and there was no
consensus to remove in the first place.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
Next
From: Jan Urbański
Date:
Subject: Re: pl/python refactoring