Re: [COMMITTERS] pgsql: Add connection messages for streaming replication. - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.
Date
Msg-id 1269408353.8481.7066.camel@ebony
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.
List pgsql-hackers
On Wed, 2010-03-24 at 10:52 +0900, Fujii Masao wrote:
> On Sat, Mar 20, 2010 at 4:19 AM, Simon Riggs <sriggs@postgresql.org> wrote:
> > Log Message:
> > -----------
> > Add connection messages for streaming replication. log_connections
> > was broken for a replication connection and no messages were
> > displayed on either standby or primary, at any debug level.
> > Connection messages needed to diagnose session drop/reconnect
> > events. Use LOG mode for now, discuss lowering in later releases.
> 
> LOG:  connection authorized: user=foo database=replication
> 
> Currently, when the primary accepts the connection from the standby,
> it emits the above message. But "database=replication" is not accurate
> because no "database" is supplied by the standby unless it's explicitly
> specified in primary_conninfo parameter. So, how about changing the
> message as follow?
> 
> LOG:  replication connection authorized: user=foo

The main thing for me was that it logged something. The above two ways
occurred to me and figured we'd end up discussing it.

The first way is slightly confusing for the reason stated, agreed. By
using the same form of words as is used currently, all existing scripts
that search for connection details will all still work. The second way
is more informative, if you don't know "replication" is a
pseudo-database, but it will break all existing scripts.

My own feeling was that breaking existing scripts was not a price worth
paying for the extra information in the second form of the message,
since its just the same words re-arranged.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: WIP: preloading of ispell dictionary
Next
From: Heikki Linnakangas
Date:
Subject: Re: Mismatch in libpqwalreceiver