Re: Let's make PostgreSQL multi-threaded

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Let's make PostgreSQL multi-threaded
Дата
Msg-id fdf09cde-3def-0079-9d37-b008b7e61d7d@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Let's make PostgreSQL multi-threaded  (Dave Cramer <davecramer@postgres.rocks>)
Ответы Re: Let's make PostgreSQL multi-threaded  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers

On 6/10/23 13:20, Dave Cramer wrote:
> 
> 
> On Fri, 9 Jun 2023 at 18:29, Stephen Frost <sfrost@snowman.net
> <mailto:sfrost@snowman.net>> wrote:
> 
>     Greetings,
> 
>     * Dave Cramer (davecramer@postgres.rocks) wrote:
>     > One thing I can think of is upgrading. AFAIK dump and restore is
>     the only
>     > way to change the on disk format.
>     > Presuming that eventually we will be forced to change the on disk
>     format it
>     > would be nice to be able to do so in a manner which does not force
>     long
>     > down times
> 
>     There is an ongoing effort moving in this direction.  The $subject isn't
>     great, but this patch set (which we are currently working on
>     updating...): https://commitfest.postgresql.org/43/3986/
>     <https://commitfest.postgresql.org/43/3986/> attempts
>     changing a lot of currently compile-time block-size pieces to be
>     run-time which would open up the possibility to have a different page
>     format for, eg, different tablespaces.  Possibly even different block
>     sizes.  We'd certainly welcome discussion from others who are
>     interested.
> 
>     Thanks,
> 
>     Stephen
> 
> 
> Upgrading was just one example of difficult problems that need to be 
> addressed. My thought was that before we commit to something as
> potentially resource intensive as changing the threading model we
> compile a list of other "big issues" and prioritize.
> 

I doubt anyone expects the community to commit to the threading switch
in this sense - drop everything else and just start working on this
(pretty massive) change. Not going to happen.

> I realize open source is more of a scratch your itch kind of development
> model, but I'm not convinced the random walk that entails is the
> appropriate way to move forward. At the very least I'd like us to
> question it.

I may be missing something, but it's not clear to me whether you argue
for the open source approach or against it. I personally think it's
perfectly fine for people to work on scratching their itch and focus on
stuff that yields value to them (or their customers).

And I think the only way to succeed at the threading switch is within
this very framework - split it into (much) smaller steps that are
beneficial on their own and scratch some other itch.

For example, we have issues with large number of connections and we've
discussed stuff like built-in connection pooling etc. for a very long
time (including this thread). But we have session state in various
places in process private memory, which makes it borderline impossible
and thus we don't have anything built-in. IIUC the threading would needs
to isolate/define the session state anyway, so perhaps it could do it in
a way that'd also work for the connection pooling (with processes)?

Which would mean this particular change is immediately beneficial even
without the threading switch (which I'd expect to take considerable
amount of time).

In a way, I think this "split into independently beneficial steps"
strategy is the only option with a meaningful chance of success.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Time delayed LR (WAS Re: logical replication restrictions)
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Let's make PostgreSQL multi-threaded