Re: Walsender doesn't process options passed in the startup packet - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Walsender doesn't process options passed in the startup packet
Date
Msg-id AANLkTikFJj3GZKr8vYPGjzQXeL6_Os2JLBUH_yjYbnOt@mail.gmail.com
Whole thread Raw
In response to Re: Walsender doesn't process options passed in the startup packet  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Walsender doesn't process options passed in the startup packet  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Fri, Sep 10, 2010 at 7:54 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
>> I found walsender didn't process options (e.g., application_name
>> in primary_conninfo) passed in the startup packet. The cause is
>> that walsender doesn't execute process_postgres_switches() and
>> SetConfigOption() in InitPostgres().
>>
>> The attached patch fixes this bug.
>
> Hmm, should walsender call InitializeClientEncoding too? It affects error
> messages. And what about per-user settings in pg_db_role_setting?

Yes, we should do both. SetDatabasePath() and RelationCacheInitializePhase3()
need to be called before accessing to pg_db_role_setting. And we should apply
PostAuthDelay. I attached the updated patch.

BTW, this issue seems to derive from the following commit.
http://archives.postgresql.org/pgsql-committers/2010-04/msg00175.php

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Next
From: Tom Lane
Date:
Subject: Re: git: uh-oh