Small correction to previous patch: we shouldn't ReleasePostmasterChildSlot
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Aug 2009 18:09:37 +0000 (18:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Aug 2009 18:09:37 +0000 (18:09 +0000)
for a dead_end child, because we didn't AssignPostmasterChildSlot.

src/backend/postmaster/postmaster.c

index 59a614aae2bd96a84887d6211fb91b5d783503b5..cabd61fc0f3458f2303a5877d16b483697856651 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.588 2009/08/24 17:23:02 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.589 2009/08/24 18:09:37 tgl Exp $
  *
  * NOTES
  *
@@ -3024,7 +3024,8 @@ BackendStartup(Port *port)
                /* in parent, fork failed */
                int                     save_errno = errno;
 
-               (void) ReleasePostmasterChildSlot(bn->child_slot);
+               if (!bn->dead_end)
+                       (void) ReleasePostmasterChildSlot(bn->child_slot);
                free(bn);
                errno = save_errno;
                ereport(LOG,