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

From Magnus Hagander
Subject Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on
Date
Msg-id AANLkTimrxQvXztHcR_a_DZzQ+qt6SzeDV6VSc8nUL69c@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: [COMMITTERS] pgsql: Log replication connections only when log_connections is on  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Wed, Jan 19, 2011 at 13:36, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Tue, 2011-01-18 at 19:04 +0000, Magnus Hagander wrote:
>> Log replication connections only when log_connections is on
>>
>> Previously we'd always log replication connections, with no
>> way to turn them off.
>
> You noted that the code was there intentionally, yet you also couldn't
> see the reason. That is not a great reason to change it. It's especially
> not a great reason to make the change quickly.

Yes. And I brought it up in discussion, and the consensus was to
change it to be consistent.

And per that thread, there was also no consensus on ever *adding* it
that way - if I'd realized it was that way back then, I would've
objected at the time. I didn't realize it until I started seeing the
systems in production more.


> The log entry served a very specific purpose, which was helping people
> to diagnose problems with replication connectivity. It isn't practical
> or sensible to force people to use log_connections to help with that;
> that is a sledgehammer to crack a nut. Few people have it turned on in
> production, so turning it on after a problem happened doesn't help
> diagnose things.

Again, if you read the thread, the consensus was to do it the simple
way and make it configurable by that one. The other suggestion was to
turn log_connections into an enum, which was considered unnecessarily
complicated.


> The negative impact of this was a couple of log lines. No bug. Plus I
> don't see any reason to introduce an incompatibility with the log output
> from 9.0.

The inability to remove it has certainly annoyed me, and I know a few
others who have commented on it. And it's inconsistent behavior,
something we in general try to avoid.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_basebackup for streaming base backups
Next
From: Heikki Linnakangas
Date:
Subject: Re: pg_dump directory archive format / parallel pg_dump