Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2F8816332D3; Wed, 21 Apr 2010 14:29:28 -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 61527-03; Wed, 21 Apr 2010 17:29:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 6703E632C2E; Wed, 21 Apr 2010 14:29:17 -0300 (ADT) Received: by pwj9 with SMTP id 9so5309176pwj.19 for ; Wed, 21 Apr 2010 10:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9UnBzrwnw9MgPArsVBo0HUza0AcouklSbOrcCB7XhVQ=; b=b0llASqR2UTXZOXU75UENT/2FgGpEQPcAz37PUTN3icw9YjnBHH4wflHmnxNg9AIjM la5JfLhq3egSXXDBWRkl0QTOLmL0IaLzUXZGLYsglVbRlvQAsKEGp5LYJE8eygXgxoiG YbzYPhhc/30O9x5+9V4J+GxS1byr2H4Apsp58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=f3RnDp7seUuGuR/LREP01RiiXfMkVID63H0n2BKj04sHRc5mEjqzBN/8BdBAAoMSAd m14I1iTha2WiL1I3FoRXs8UapRnCD6zQYcPehPaXXbvwwNsg1GnHM2OB1AQnp+EWzNnw rMuPs5/ysyKE2QnEeWl4UnveQFxu+yaeo41OI= MIME-Version: 1.0 Received: by 10.231.38.194 with HTTP; Wed, 21 Apr 2010 10:29:15 -0700 (PDT) In-Reply-To: <25094.1271866859@sss.pgh.pa.us> References: <3f0b79eb1003300152g5327eb47w8f9aecae6002b215@mail.gmail.com> <19262.1270142946@sss.pgh.pa.us> <4BB4952D0200002500030333@gw.wicourts.gov> <4BB4DBEF.3010301@agliodbs.com> <7978.1271807616@sss.pgh.pa.us> <25094.1271866859@sss.pgh.pa.us> Date: Wed, 21 Apr 2010 13:29:15 -0400 Received: by 10.114.138.5 with SMTP id l5mr4899358wad.58.1271870955456; Wed, 21 Apr 2010 10:29:15 -0700 (PDT) Message-ID: Subject: Re: [HACKERS] Streaming replication document improvements From: Robert Haas To: Tom Lane Cc: Fujii Masao , Josh Berkus , Kevin Grittner , Heikki Linnakangas , pgsql-docs@postgresql.org, PostgreSQL-development Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.42 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201004/76 X-Sequence-Number: 5475 On Wed, Apr 21, 2010 at 12:20 PM, Tom Lane wrote: > Robert Haas writes: >> Thanks for the heads up. =A0It doesn't look hard to put a similar test >> in the walsender code path, but is there any reason to duplicate the >> code? =A0Seems 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. =A0The I am guessing that by "both of those connection-rejecting tests", you mean the one that can throw "must be superuser to connect during database shutdown" as well as the one we were discussing, which can throw "connection limit exceeded for non-superusers", in which case... > 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. ...shouldn't we move the "tests", plural, rather than just the one? It seems right to reject new SR connections during shutdown. ...Robert