|
|
Subscribe / Log in / New account

PostgreSQL 9.3 beta: Federated databases and more

PostgreSQL 9.3 beta: Federated databases and more

Posted May 28, 2013 20:57 UTC (Tue) by rpkelly (guest, #74224)
In reply to: PostgreSQL 9.3 beta: Federated databases and more by jberkus
Parent article: PostgreSQL 9.3 beta: Federated databases and more

Is it possible to use threads within a single backend easily? So that things like parallel sorting, joining, or reading could be achieved? Or maybe that doesn't make any sense.


to post comments

PostgreSQL 9.3 beta: Federated databases and more

Posted Jun 1, 2013 9:01 UTC (Sat) by kleptog (subscriber, #1183) [Link]

Threads are theoretically possible but have been held off primarily because it becomes very hard to reason about whether the code as it is is correct. There are a lot of shared structures (with other backends) with locking semantics based on individual processes and it's not immediately clear how that would interact with multiple threads.

That said, if you restrict yourself to just the executor you primarily have to deal with the memory allocator and the disk buffers. Is it possible to make that thread-safe? I'm not sure anyone has tried. I think with only a few weeks work you could probably make something functional. However, convincing everyone that the solution is as robust as the current setup is much much harder.


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