Re: [HACKERS] [DOCS] Streaming replication document improvements

2010-04-21 Thread Tom Lane
Robert Haas writes: > ...shouldn't we move the "tests", plural, rather than just the one? > It seems right to reject new SR connections during shutdown. Yeah; you'd also need to adjust both of them to consider am_walsender. (IOW, we want to treat SR connections as non-superuser for both tests.)

Re: [HACKERS] [DOCS] Streaming replication document improvements

2010-04-21 Thread Robert Haas
On Wed, Apr 21, 2010 at 12:20 PM, Tom Lane wrote: > 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 >> necessar

Re: [HACKERS] [DOCS] Streaming replication document improvements

2010-04-21 Thread Tom Lane
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

Re: [HACKERS] [DOCS] Streaming replication document improvements

2010-04-21 Thread Robert Haas
On Tue, Apr 20, 2010 at 7:53 PM, Tom Lane wrote: > Robert Haas writes: >> Current logic says we hit the connection limit if: > >>         if (!am_superuser && >>                 ReservedBackends > 0 && >>                 !HaveNFreeProcs(ReservedBackends)) > >> Couldn't we just change this to: > >