Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add connection messages for streaming replication.
Date: 2010-03-24 05:25:53
Message-ID: 1269408353.8481.7066.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message User Maosen 2010-03-24 05:32:05 pgexternaltable - src: fix bug ISNEEDMAPNEXT
Previous Message Bruce Momjian 2010-03-24 03:13:45 pgsql: Document in postgresql.conf that the max_standby_delay default is

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-03-24 06:26:44 Re: Mismatch in libpqwalreceiver
Previous Message Craig Ringer 2010-03-24 05:14:55 Re: WIP: preloading of ispell dictionary