From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, Christophe Pettus <xof(at)thebuild(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Built-in connection pooling |
Date: | 2018-05-18 20:05:32 |
Message-ID: | CA+TgmoZgHO5VXGGM1-4WhDk2Z+doozzC=YVP6HvCA5hznszhtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 17, 2018 at 9:09 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> However, I think that's probably worrying about the wrong end of the
>> problem first. IMHO, what we ought to start by doing is considering
>> what a good architecture for this would be, and how to solve the
>> general problem of per-backend session state. If we figure that out,
>> then we could worry about optimizing whatever needs optimizing, e.g.
>> memory usage.
>
> Yes, I think this matches my previous question --- if we are going to
> swap out session state to allow multiple sessions to multiplex in the
> same OS process, and that swapping has similar overhead to how the OS
> swaps processes, why not just let the OS continue doing the process
> swapping.
>
> I think we need to first find out what it is that makes high session
> counts slow. For example, if we swap out session state, will we check
> the visibility rules for the swapped out session. If not, and that is
> what makes swapping session state make Postgres faster, let's just find
> a way to skip checking visibility rules for inactive sessions and get
> the same benefit more simply.
I don't think we're really in agreement. I am pretty convinced that
we can save a lot of memory and other CPU resources if we don't need a
separate process for each session. I don't have any doubt that the
benefit is there. My point is rather that we need an organized way to
attach the problem of saving and restoring session state, not an
ad-hoc approach for each particular kind of session state.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-05-18 20:13:20 | Re: Incorrect comment in get_partition_dispatch_recurse |
Previous Message | Robert Haas | 2018-05-18 20:02:18 | Re: Should we add GUCs to allow partition pruning to be disabled? |