From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Postgres with pthread |
Date: | 2017-12-07 03:26:07 |
Message-ID: | CAMsr+YESsWGuOZ9tG6tg5YSV-so_i6N6kmB4_p3Ho7V0sAvmNg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7 December 2017 at 05:58, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
wrote:
>
> Using a ton of thread local variables may be a useful stepping stone,
> but if we want to be able to separate threads/processes from sessions
> eventually then I guess we'll want to model sessions as first class
> objects and pass them around explicitly or using a single TLS variable
> current_session.
>
>
Yep.
This is the real reason I'm excited by the idea of a threading conversion.
PostgreSQL's architecture conflates "connection", "session" and "executor"
into one somewhat muddled mess. I'd love to be able to untangle that to the
point where we can pool executors amongst active queries, while retaining
idle sessions' state properly even while they're in a transaction.
Yeah, that's a long way off, but it'd be a whole lot more practical if we
didn't have to serialize and deserialize the entire session state to do it.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tsunakawa, Takayuki | 2017-12-07 03:44:04 | RE: Postgres with pthread |
Previous Message | Craig Ringer | 2017-12-07 03:20:44 | Re: Postgres with pthread |