Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 47F846325A4; Wed, 21 Apr 2010 13:21:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 50110-05; Wed, 21 Apr 2010 16:21:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AB74A632588; Wed, 21 Apr 2010 13:21:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o3LGKxTI025095; Wed, 21 Apr 2010 12:20:59 -0400 (EDT) To: Robert Haas cc: Fujii Masao , Josh Berkus , Kevin Grittner , Heikki Linnakangas , pgsql-docs@postgresql.org, PostgreSQL-development Subject: Re: [HACKERS] Streaming replication document improvements In-reply-to: References: <3f0b79eb1003300152g5327eb47w8f9aecae6002b215@mail.gmail.com> <4BB49B0C.1050901@enterprisedb.com> <19262.1270142946@sss.pgh.pa.us> <4BB4952D0200002500030333@gw.wicourts.gov> <4BB4DBEF.3010301@agliodbs.com> <7978.1271807616@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 21 Apr 2010 12:10:10 -0400" Date: Wed, 21 Apr 2010 12:20:59 -0400 Message-ID: <25094.1271866859@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.409 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: ** X-Archive-Number: 201004/75 X-Sequence-Number: 5474 Robert Haas writes: > Thanks for the heads up. It doesn't look hard to put a similar test > in the walsender code path, but is there any reason to duplicate the > code? Seems like we might be able to just put this test (with the > necessary modification) right before this comment: Hm, actually I think you're right: we could move both of those connection-rejecting tests up to before the walsender exit. The only extra state we need is ReservedBackends, which should be valid at that point (in particular, it can't be affected by any process-local GUC settings). +1 for just moving the test. regards, tom lane