随笔分类 -  PgSQL&Greenplum

1 2 下一页
GP数据库数据迁移-pg_dump备份恢复GP数据库
摘要:导出数据库: pg_dump --gp-syntax -U xxx -h xxx -p 5432 -d assetdb -Fa -c -C -f /home/gpadmin/tempdir/scottdb_202407111444.sql 导入GP数据库:scottdb_202407111444.s 阅读全文
posted @ 2024-07-11 10:28 helontian
GP维护工具-gprecoverseg
摘要:[WARNING]:-Mirror Active, Primary Failed Not In Sync [gpadmin@datacle-gp01 ~]$ gpstate -c 20220513:16:22:24:017955 gpstate:datacle-gp01:gpadmin-[INFO] 阅读全文
posted @ 2022-05-05 14:24 helontian 阅读(463) 评论(0) 推荐(0)
Clickhouse基本操作
摘要:登陆clickhouse # clickhouse-client -uxxx --password xxx --port 9000ClickHouse client version 21.10.2.15 (official build).Connecting to localhost:9000 as 阅读全文
posted @ 2022-04-13 09:31 helontian 阅读(179) 评论(0) 推荐(0)
【PgSQL管理】命令行下执行SQL
摘要:#-c实现命令行下执行SQL $ psql -h localhost -c "SELECT datname FROM pg_database where datistemplate = false and datname != 'postgres';" datname monitor dw(2 ro 阅读全文
posted @ 2022-04-06 14:30 helontian 阅读(1221) 评论(0) 推荐(0)
【GP集群部署】集群部署(2+4模式),Greenplum集群源码安装文档
摘要:一、环境准备 操作系统版本 $ cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core) Python版本:Python 2.7.5 Greenplum版本: gpdb-6.17.5.tar.gz 下载地址: https://githu 阅读全文
posted @ 2022-04-06 13:44 helontian 阅读(571) 评论(0) 推荐(0)
【GP性能相关】gp_toolkit监控语句
摘要:gp_toolkit 说明 1、表膨胀相关查询 2、表倾斜的相关信息 3、锁查询相关的信息 4、日志查询相关的信息 5、资源队列相关查询信息 6、查看磁盘上(database,schema,table,indexs,view)等的占用大小的相关信息 7、用户使用的工作空间大小信息 8、查看用户创建的 阅读全文
posted @ 2022-04-06 10:21 helontian 阅读(119) 评论(0) 推荐(0)
【GP集群故障处理】ERROR: interconnect encountered a network error
摘要:业务系统通过接口访问Greenplum报错信息: org.postgresql.util.PSQLException: ERROR: interconnect encountered a network error, please check your network (seg1 slice5 10 阅读全文
posted @ 2022-04-06 10:15 helontian 阅读(1446) 评论(0) 推荐(0)
【GP集群重启报错】could not create semaphores: No space left on device","Failed system call was semget
摘要:20220327:15:52:00:032027 gprecoverseg:t3-tkhibdp-bdp-gp01:gpadmin-[INFO]:-Process results...20220327:15:52:00:032027 gprecoverseg:t3-tkhibdp-bdp-gp01: 阅读全文
posted @ 2022-03-27 15:59 helontian 阅读(427) 评论(0) 推荐(0)
【PgSQL流复制管理】搭建备库过程错误记录
摘要:postgresql版本:12.3 搭建流复制备份的记录: $ /usr/local/pgsql/bin/pg_basebackup -h p0-primary -p 5432 -U repuser -w -Fp -Xs -Pv -R -D /data/pgsql_5432/pgdata/pg_ba 阅读全文
posted @ 2022-03-11 08:57 helontian 阅读(900) 评论(0) 推荐(0)
【GP权限管理】创建资源队列
摘要:定义一个新的资源队列 概要 CREATE RESOURCE QUEUE name WITH (queue_attribute=value [, ... ]) 其中queue_attribute是: ACTIVE_STATEMENTS=integer [ MAX_COST=float [COST_OV 阅读全文
posted @ 2022-02-24 16:31 helontian 阅读(421) 评论(0) 推荐(0)
【GP集群】基础性运维
摘要:greenplum 集群(1master 1standby master 6segments) 集群启动/关闭: gpstart -a ; gpstop -M fast 只关闭master节点: pg_ctl stop -s -m fast -D $MASTER_DATA_DIRECTORY或者 p 阅读全文
posted @ 2021-12-30 20:32 helontian 阅读(247) 评论(0) 推荐(0)
【GP集群】搭建过程中,初始化过程记录
摘要:Greenplum集群初始化过程记录: [gpadmin@p0-ze-bdp-greenplum01 gpdb]$ gpinitsystem -c /gpdb/gphome/conf/gpinitsystem_config -h /gpdb/gphome/conf/hostlist -s p0-ze 阅读全文
posted @ 2021-12-23 17:05 helontian 阅读(263) 评论(0) 推荐(0)
【PgSQL extension】源码安装Pg,默认未安装postgres_fdw
摘要:$ psql -Vpsql (PostgreSQL) 12.3 安装postgres_fdw $ cd /usr/local/pgsql/contrib/$ ls |grep postgres_fdw/$ cd postgres_fdw/$ lsconnection.c deparse.c expe 阅读全文
posted @ 2021-12-08 13:51 helontian 阅读(188) 评论(0) 推荐(0)
【PgSQL流复制管理】检测主备库复制状态
摘要:master: postgres=# select pid,usename,application_name,client_addr,client_port,backend_start,state,write_lsn,replay_lsn,sync_priority,sync_state from 阅读全文
posted @ 2021-12-05 12:20 helontian 阅读(553) 评论(0) 推荐(0)
【GP集群部署】GP集群切换测试
摘要:GP集群切换测试:1.确定集群状态t3-ze-app09为standby master节点,t3-ze-app11是master节点$ gpstate -a20211102:09:37:58:023988 gpstate:t3-ze-app11:greenplum-[INFO]:-Starting 阅读全文
posted @ 2021-11-02 11:05 helontian 阅读(211) 评论(0) 推荐(0)
【GP集群部署】结构方案选择
摘要:1、Grouped Mirror 2、Spread Mirror 部署Greenplum,建议采用Spread Mirror 阅读全文
posted @ 2021-10-21 11:34 helontian 阅读(91) 评论(0) 推荐(0)
【GP集群部署】1master 1standy master 2segments实施过程
摘要:Greenplum集群安装文档 一、环境准备 操作系统版本 $ cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core) Python版本:Python 2.7.5 Greenplum版本: gpdb-6.17.5.tar.gz 下载地 阅读全文
posted @ 2021-10-08 14:36 helontian 阅读(242) 评论(0) 推荐(0)
【GP集群部署】问题汇总
摘要:【问题一】ERROR]: Expected passwordless ssh to host $ gpssh-exkeys -f /home/greenplum/gphome/conf/hostlist [ERROR]: Failed to ssh to t3-guido-app11. No ECD 阅读全文
posted @ 2021-09-29 14:08 helontian 阅读(819) 评论(0) 推荐(0)
【PgSQL同步插件】cdc插件之wal2json日常维护
摘要:只获取变化,不消费slot:SELECT * FROM pg_logical_slot_peek_changes('zedb_slot', NULL, NULL);查询数据库创建的slotselect * from pg_replication_slots ; slot_name | plugin 阅读全文
posted @ 2021-09-23 09:38 helontian 阅读(709) 评论(0) 推荐(0)
【PgSQL逻辑复制】剖析postgresql逻辑复制原理
摘要:剖析postgresql逻辑复制原理: https://zhuanlan.zhihu.com/p/163204827 逻辑复制是Postgres10出现的功能,一提到逻辑复制很多人可能会联想到很多其他的词汇,比如'逻辑解析'、'逻辑订阅'、'pglogical'、'wal2json'、'BDR' 阅读全文
posted @ 2021-09-13 15:56 helontian 阅读(293) 评论(0) 推荐(0)

1 2 下一页