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