系统管理 维护监控 简单生活
skype_plproxy
转:https://developer.skype.com/SkypeGarage/DbProjects/PlProxy
1.introduction
PL/Proxy is a proxy language used for remote database procedure calls and data partitioning between databases based on hashing field values.
Main idea is that proxy function will be created with same signature as remote function to be called, so only destination info needs to be specified inside proxy function body.
PL/Proxy 是一种代理语言,主要用于是数据库远程过程调用和通过hash一个字段把数据分布到几个数据库上.
主要原理是代理服务器通过创建和远程(被代理的那个功能)节点相同调用指纹,所以,在代理的功能主体中只需要目的地信息
2. Features
- PL/Proxy functions detect remote functions to be called from their own signature.
- Function can be run on one, some or all members of the cluster.
- If query is executed on several partitions, it will happen in parallel.
- Queries are run in auto-commit mode on the remote server.
- Query parameters are sent separately from query body, thus avoiding quoting/unquoting overhead on both sides.
- If proxy and partition backend versions match, PL/Proxy tries to use binary I/O if possible.
1. PL/Proxy函数从它们自己的指纹里判断需要调用的远端函数 2. 函数可以运行在一个或是几个或是所有集群节点上 3. 如果一个请求需要几个分区来执行,他们将是并行的 4. 查询在远程服务器上是运行在自动提交模式的 5. 查询的参数和查询主体是分开的,从而可以减少引用/反调用双方的开销 6. 如果查询和分区后端的版本匹配,PL/Proxy尽可能的尝试使用二进制I / O
3. Restrictions
- PL/Proxy launches connections into each part from each backend, so in heavy-duty environment is necessary to put pooler between PL/Proxy and partitions. We have specially for that developed ../PgBouncer which is a pooler that can do statement-based pooling - release server after each SQL statement.
PL/Proxy 查询到每一个分区都会在后端建产一个连接,如果在重要的的环境里,有必要在PL 和千分区之间放一个连接沲
| 打印文章 | 这篇文章由admin于2009年09月4日 12:17 下午发表在pgsql, 技术实践。你可以订阅RSS 2.0 也可以发表评论或引用到你的网站。 |