Ignore attempts to set "application_name" in the connection startup packet.
authorTom Lane <[email protected]>
Wed, 2 Dec 2009 17:41:53 +0000 (17:41 +0000)
committerTom Lane <[email protected]>
Wed, 2 Dec 2009 17:41:53 +0000 (17:41 +0000)
This avoids a useless connection retry and complaint in the postmaster log
when receiving a connection from 8.5 or later libpq.

Backpatch in all supported branches, but of course *not* HEAD.

src/backend/postmaster/postmaster.c

index 1d491b8b31716e79f15f325ee36cadae64388f14..17a424450781bf08f99f79d6afad564a02ae199b 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.443.4.11 2008/06/27 01:52:58 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.443.4.12 2009/12/02 17:41:53 tgl Exp $
  *
  * NOTES
  *
@@ -1484,6 +1484,8 @@ retry1:
                                port->user_name = pstrdup(valptr);
                        else if (strcmp(nameptr, "options") == 0)
                                port->cmdline_options = pstrdup(valptr);
+                       else if (strcmp(nameptr, "application_name") == 0)
+                               /* ignore for compatibility with libpq >= 8.5 */ ;
                        else
                        {
                                /* Assume it's a generic GUC option */