博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PostgreSQL 10.0 preview 多核并行增强 - 索引扫描、子查询、VACUUM、fdw/csp钩子
阅读量:5918 次
发布时间:2019-06-19

本文共 2356 字,大约阅读时间需要 7 分钟。

标签

PostgreSQL , 10.0 , 并行计算 , 索引扫描 , 子查询 , VACUUM , 外部表并行


背景

PostgreSQL 9.6推出的多核并行计算特性,支持全表扫描,hash join,聚合操作。

10.0 在此基础上,增加了更多的支持。

1. Parallel bitmap heap scan

2. Parallel Index Scans

3. Parallel Merge Join

4. parallelize queries containing subplans

5. Block level parallel vacuum

6. Extending the parallelism for index-only scans

7. ParallelFinish Hook of FDW/CSP

这是一个fdw钩子,用于在访问FDW/CSP的node(backend process)的内存上下文释放前,让上面的gather node获得上下文的控制权。

从而,从DSM中获得每个fdw node通道的统计信息,比如pg_strom项目,custom scan阶段的dma数据传输的速度,GPU的运算时间等。

使用这个钩子,就可以达到以上目的。

Hello,    The attached patch implements the suggestion by Amit before.    What I'm motivated is to collect extra run-time statistics specific  to a particular ForeignScan/CustomScan, not only the standard  Instrumentation; like DMA transfer rate or execution time of GPU  kernels in my case.    Per-node DSM toc is one of the best way to return run-time statistics  to the master backend, because FDW/CSP can assign arbitrary length of  the region according to its needs. It is quite easy to require.  However, one problem is, the per-node DSM toc is already released when  ExecEndNode() is called on the child node of Gather.    This patch allows extensions to get control on the master backend's  context when all the worker node gets finished but prior to release  of the DSM segment. If FDW/CSP has its special statistics on the  segment, it can move to the private memory area for EXPLAIN output  or something other purpose.    One design consideration is whether the hook shall be called from  ExecParallelRetrieveInstrumentation() or ExecParallelFinish().  The former is a function to retrieve the standard Instrumentation  information, thus, it is valid only if EXPLAIN ANALYZE.  On the other hands, if we put entrypoint at ExecParallelFinish(),  extension can get control regardless of EXPLAIN ANALYZE, however,  it also needs an extra planstate_tree_walker().    Right now, we don't assume anything onto the requirement by FDW/CSP.  It may want run-time statistics regardless of EXPLAIN ANALYZE, thus,  hook shall be invoked always when Gather node confirmed termination  of the worker processes.    Thanks,  --  NEC OSS Promotion Center / PG-Strom Project  KaiGai Kohei 

这个patch的讨论,详见邮件组,本文末尾URL。

PostgreSQL社区的作风非常严谨,一个patch可能在邮件组中讨论几个月甚至几年,根据大家的意见反复的修正,patch合并到master已经非常成熟,所以PostgreSQL的稳定性也是远近闻名的。

参考

转载地址:http://ykdvx.baihongyu.com/

你可能感兴趣的文章
Swap file ".." already exists!
查看>>
深入玩转K8S之外网如何访问业务应用(nginx-ingress篇)
查看>>
Vnc viewer Linux远程连接
查看>>
Symantec System Recovery 2013 R2 安裝操作指南
查看>>
:() { :|:& }; : # <-- 打开终端,输入这个,回车.你看到了什么??
查看>>
Nginx 日志文件切割
查看>>
[李景山php]每天TP5-20170102|thinkphp5-Env.php
查看>>
router-id的作用
查看>>
how to remove sql cluster 2012
查看>>
fdisk交互式划分磁盘分区示例
查看>>
Linux 根分区空间不足,mysql数据占用过大
查看>>
“chaos”的算法--之Floyd算法详解(求最短路径)
查看>>
提高企业IT服务管理能力的神器-ITSM(IT Service Management,IT服务管理)
查看>>
【RHCE学习笔记】RHEL7下ISCSI存储的配置过程
查看>>
SSH Secure Shell Client中文乱码的解决方法
查看>>
我的友情链接
查看>>
django路由层
查看>>
Windows 2008 WDS 服务器搭建续(三)
查看>>
redis-dump数据导出以及redis-load还原数据
查看>>
使一段代码随项目开启而开启
查看>>