pgspider Citus docker 镜像使用

以前有简单说明过pgspider 集成Citus的使用说明,但是使用上还是不太方便,所以进行了一些调整

原理说明

因为pgspider Citus docker 镜像参考自postgrres 的所以可以直接使用/docker-entrypoint-initdb.d

使用

  • docker-compose 文件
version: "3"
services: 
  pg-citus-master:
    container_name: pg-citus-master
    image: dalongrong/pgspider:citus-9.1
    volumes: 
    - "./csvfiles:/opt/csv"
    - "./sql:/docker-entrypoint-initdb.d/"
    ports: 
    - "5432:5432"
    environment: 
    - "POSTGRES_PASSWORD=dalong"
  pg-citus-worker:
    container_name: pg-citus-worker
    image: dalongrong/pgspider:citus-9.1
    volumes: 
    - "./csvfiles:/opt/csv"
    - "./sql:/docker-entrypoint-initdb.d/"
    ports: 
    - "5433:5432"
  pg-citus-worker2:
    container_name: pg-citus-worker2
    image: dalongrong/pgspider:citus-9.1
    volumes: 
    - "./csvfiles:/opt/csv"
    - "./sql:/docker-entrypoint-initdb.d/"
    ports: 
    - "5434:5432"
  • init sql
    很简单,就是创建扩展
 
BEGIN;
CREATE EXTENSION citus;
COMMIT;

说明

关于citus 官方使用membership-manager,可以根据实际情况,通过暴露的函数操作也是可以的,只是缺少了自动的能力

参考资料

https://hub.docker.com/r/citusdata/citus
https://github.com/citusdata/citus
https://hub.docker.com/repository/docker/dalongrong/pgspider
https://github.com/rongfengliang/pgspider-docker
https://github.com/rongfengliang/pgspider-citus-learning

posted on   荣锋亮  阅读(560)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-03-08 nginx unit 1.8 支持基于java servlet 的开发模型
2019-03-08 试用 openresty/lua-resty-shell
2018-03-08 grpc rust 项目基本使用
2016-03-08 Jquery使用ajax以及angularjs 动态模板加载并进行渲染
2016-03-08 angular.element方法汇总以及AngularJS 动态添加元素和删除元素
2016-03-08 JavaScript文件中调用AngularJS内部方法或改变$scope变量

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示