Design of a Shared Memory mechanism for efficient paralell processing in PostgreSQL

Yoshifumi Ujibashi, Minoru Nakamura, Tsuguchika Tabaru, Takushi Hashida, Motoyuki Kawaba, Lilian Harada · 2015

PostgreSQL is a reliable and mature OSS RDBMS that has become widely utilized in enterprise systems recently. In order to meet the increasing performance requirements of such systems, PostgreSQL OSS Community enforced PostgreSQL version 9.4 parallel execution framework introducing the Dynamic Shared Memory and the Dynamic Background Workers. However, the Dynamic Shared Memory does not guarantee that shared data are mapped to the same address space in the processes and thus data with pointers cannot be straightly shared without local copies. In this paper we propose a new shared memory framework called Shared MemoryContext that provides a shared memory mapped to the same address to all processes. It enables an efficient parallel processing in PostgreSQL by avoiding unnecessary data copies of inter-process shared data. The Shared MemoryContext interface is compatible with PostgreSQL's MemoryContext interface and thus existing PostgreSQL routines can be used for parallel processing without modification.

Read the paper · More papers on PaperTik