]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Ignore attempts to set "application_name" in the connection startup packet.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Dec 2009 17:41:31 +0000 (17:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Dec 2009 17:41:31 +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 ebac2299fed89844ddcb590d35f4af8f20295f95..636b12f737fcfaf2d4b62948675884faeab14835 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551.2.4 2009/08/24 17:23:28 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.551.2.5 2009/12/02 17:41:31 tgl Exp $
  *
  * NOTES
  *
@@ -1546,6 +1546,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 */