Thread: Interesting behavior change in 8.2.x

Interesting behavior change in 8.2.x

From
Tatsuo Ishii
Date:
Hi,

While inspecting a report from pgpool-II user, I found an interesting
behavior change in 8.2 series.

When connecting to 8.2.13 using 9.0's psql, I got following error
message:

11034 2010-12-27 14:50:57 JST FATAL:  unrecognized configuration parameter "application_name"

However if I connect to 8.2.18, I got no such error message. This
makes pgpool-II confusing if those version of PostgreSQL are mixed
used as backend.

It seems somewhere between 8.2.13 and 8.2.18, an behavior change was
made. According to a someone who were inspecting this, the change was
precisely made between 8.2.14 and 8.2.15.  I couldn't find related
item in HISTORY of 8.2.15.  Does anybody know if this change was
intentional? If so, why?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


Re: Interesting behavior change in 8.2.x

From
Fujii Masao
Date:
On Mon, Dec 27, 2010 at 3:06 PM, Tatsuo Ishii <ishii@postgresql.org> wrote:
> It seems somewhere between 8.2.13 and 8.2.18, an behavior change was
> made. According to a someone who were inspecting this, the change was
> precisely made between 8.2.14 and 8.2.15.  I couldn't find related
> item in HISTORY of 8.2.15.

http://archives.postgresql.org/message-id/20091202174139.F380E753FB7%40cvs.postgresql.org

>  Does anybody know if this change was
> intentional? If so, why?

Yes, it's intentional. It's for preventing 9.0 or later libpq from
causing useless
connection failures when connecting to the old servers.

Regards,

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


Re: Interesting behavior change in 8.2.x

From
Dave Page
Date:
On Mon, Dec 27, 2010 at 6:06 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
> Hi,
>
> While inspecting a report from pgpool-II user, I found an interesting
> behavior change in 8.2 series.
>
> When connecting to 8.2.13 using 9.0's psql, I got following error
> message:
>
> 11034 2010-12-27 14:50:57 JST FATAL:  unrecognized configuration parameter "application_name"
>
> However if I connect to 8.2.18, I got no such error message. This
> makes pgpool-II confusing if those version of PostgreSQL are mixed
> used as backend.
>
> It seems somewhere between 8.2.13 and 8.2.18, an behavior change was
> made. According to a someone who were inspecting this, the change was
> precisely made between 8.2.14 and 8.2.15.  I couldn't find related
> item in HISTORY of 8.2.15.  Does anybody know if this change was
> intentional? If so, why?

It was intentional. The application_name GUC was added to libpq for
9.0 as a startup parameter to allow connections to indicate what they
were. A change was backported to prevent the server from rejecting
this parameter if libpq tried to set it, instead we simply ignore it
(if memory serves). The reason is, that we need to set
application_name early in the connection process, before we know the
server version, so we need the server to ignore it if we want people
to be able to use the 9.0 libpq with older servers (which of course,
we do).


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company