Re: Walsender doesn't process options passed in the startup packet
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-09-10T12:56:25Z
Lists: pgsql-hackers
Attachments
- startup_packet_options_and_walsender_v2.patch (application/octet-stream) patch v2
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