|
|
Subscribe / Log in / New account

Aim for the stars

Aim for the stars

Posted Jun 19, 2023 22:22 UTC (Mon) by Wol (subscriber, #4433)
In reply to: Aim for the stars by nevyn
Parent article: PostgreSQL reconsiders its process-based model

It wasn't meant as a comparison. The Big Kernel Lock and the GIL enforced "single process". PostgreSQL *is* a single process?

Linux and Python decided that removing that restriction was worthwhile. Whether PostgreSQL succeeds or not, the effort they make towards removing that restriction may well be worthwhile.

Cheers,
Wol


to post comments

Aim for the stars

Posted Jun 19, 2023 23:18 UTC (Mon) by michaelmior (guest, #165680) [Link]

Postgres scales by coordinating among multiple processes on a single machine. The proposal is to use multiple threads instead of multiple processes.

This is similar to the CPython GIL, but the GIL doesn't enforce a single process. It prevents multiple threads from running concurrently in the same process. In CPython with the GIL, multiple processes are *necessary* to scale CPU-bound code.

Aim for the stars

Posted Jun 22, 2023 10:46 UTC (Thu) by khim (subscriber, #9252) [Link]

> PostgreSQL *is* a single process?

Have you actually read the article? No, it's most definitely not a single process. They are using multiple processes, shared memory and, obviously, some locks to ensure consistency.

Which means they already have locks and don't need GIL or BKL.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds