Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
Date: 2011-01-19 16:05:05
Message-ID: 1295453105.3282.10341.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-01-19 16:19:26 Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
Previous Message Tom Lane 2011-01-19 15:58:48 Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Urbański 2011-01-19 16:07:19 Re: pl/python refactoring
Previous Message Tom Lane 2011-01-19 15:58:48 Re: Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on