From:
Robert Haas <robertmhaas(at)gmail(dot)com>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-docs(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: [HACKERS] Streaming replication document improvements
Date:
2010-04-21 16:10:10
Message-ID:
r2p603c8f071004210910wa102b30eqaf3378fc358e4512@mail.gmail.com (view raw or flat )
Thread:
2010-03-30 08:52:19 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-03-31 20:39:09 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-04-01 01:50:13 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-01 01:52:48 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-01 01:58:05 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-01 02:00:16 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-01 02:14:50 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-01 13:09:32 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-04-01 14:08:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-01 17:18:45 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-01 17:29:06 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-01 17:44:29 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-04-01 17:46:23 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-04-01 17:58:35 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-01 18:49:24 from Josh Berkus <josh(at)agliodbs(dot)com>
2010-04-01 19:17:11 from Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
2010-04-01 22:55:46 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2010-04-02 06:06:04 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-20 02:04:59 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-20 09:47:51 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-20 10:52:11 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-20 13:35:06 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-04-20 13:40:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-20 13:42:51 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-20 13:47:08 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-20 14:01:48 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-20 14:08:37 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-20 14:24:38 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-04-21 01:40:09 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2010-04-20 23:53:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-21 16:10:10 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-21 16:20:59 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-04-21 17:29:15 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-04-21 17:56:03 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Lists:
pgsql-docs pgsql-hackers
On Tue, Apr 20, 2010 at 7:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Current logic says we hit the connection limit if:
>
>> if (!am_superuser &&
>> ReservedBackends > 0 &&
>> !HaveNFreeProcs(ReservedBackends))
>
>> Couldn't we just change this to:
>
>> if ((!am_superuser || am_walsender) &&
>> ReservedBackends > 0 &&
>> !HaveNFreeProcs(ReservedBackends))
>
> As of the patch I just committed, that code is not reached anymore by a
> walsender process. However, it shouldn't be hard to put a similar test
> into the walsender code path.
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:
/*
* If walsender, we're done here --- we don't want to connect to any
* particular database.
*/
In fact, in some ways, it seems better to put it up there. If the
database is really being flooded with connection attempts, we want to
ephemerally consume a backend slot for as little time as possible...
...Robert
In response to
Responses
pgsql-docs by date
Next :From: Tom LaneDate: 2010-04-21 16:20:59
Subject : Re: [HACKERS] Streaming replication document improvements
Previous :From : Fujii MasaoDate : 2010-04-21 01:40:09
Subject : Re: [HACKERS] Streaming replication document improvements
pgsql-hackers by date
Next :From: Tom LaneDate: 2010-04-21 16:20:59
Subject : Re: [HACKERS] Streaming replication document improvements
Previous :From : Robert HaasDate : 2010-04-21 15:59:10
Subject : Re: GSoC - proposal - Materialized Views in PostgreSQL