四节点:ivory
使用 WiltonDB / Babelfish 的 Microsoft SQL Server 兼容内核替代 PostgreSQL
Categories:
ivory
配置模板基于 full
模板,使用使用瀚高的 IvorySQL (Oracle兼容内核)替代原生 PostgreSQL 内核
完整教程请参考:IvorySQL (Oracle兼容) 内核使用说明
配置概览
- 配置名称:
ivory
- 节点数量: 四节点,
pigsty/vagrant/spec/full.rb
- 配置说明:Babelfish/WiltonDB 四节点配置模板,提供 Microsoft SQL Server 兼容能力
- 适用系统:
el7
,el8
,el9
- 适用架构:
x86_64
,aarch64
(el7
除外) - 相关配置:
full
启用方式:在 configure
过程中使用 -c ivory
参数:
./configure -c ivory
备注:这是一个四节点模版,您需要在生成配置后修改其他三个节点的 IP 地址(可选)
配置内容
源文件地址:pigsty/conf/ivory.yml
all:
children:
#----------------------------------#
# infra: monitor, alert, repo, etc..
#----------------------------------#
infra: { hosts: { 10.10.10.10: { infra_seq: 1 } } }
#----------------------------------#
# etcd cluster for HA postgres DCS
#----------------------------------#
etcd: { hosts: { 10.10.10.10: { etcd_seq: 1 } }, vars: { etcd_cluster: etcd } }
#----------------------------------#
# pgsql (singleton on current node)
#----------------------------------#
pg-meta:
hosts:
10.10.10.10: { pg_seq: 1, pg_role: primary }
vars:
pg_cluster: pg-meta
pg_databases: [ { name: meta ,baseline: cmdb.sql ,comment: polardb database ,schemas: [ pigsty ] }]
pg_users:
- { name: dbuser_meta ,password: DBUser.Meta ,pgbouncer: true ,roles: [ dbrole_admin ] ,comment: pigsty admin user }
- { name: dbuser_view ,password: DBUser.Viewer ,pgbouncer: true ,roles: [ dbrole_readonly ] ,comment: read-only viewer for meta database }
#----------------------------------#
# pgsql cluster: pg-test (3 nodes) #
#----------------------------------#
# pg-test ---> 10.10.10.3 ---> 10.10.10.1{1,2,3}
pg-test: # define the new 3-node cluster pg-test
hosts:
10.10.10.11: { pg_seq: 1, pg_role: primary }
10.10.10.12: { pg_seq: 2, pg_role: replica }
10.10.10.13: { pg_seq: 3, pg_role: replica, pg_offline_query: true }
vars:
pg_cluster: pg-test # define pgsql cluster name
pg_users: [{ name: test , password: test , pgbouncer: true , roles: [ dbrole_admin ] }]
pg_databases: [{ name: test }]
pg_vip_enabled: true
pg_vip_address: 10.10.10.3/24
pg_vip_interface: eth1
vars:
#----------------------------------#
# Meta Data
#----------------------------------#
version: v3.1.0 # pigsty version string
admin_ip: 10.10.10.10 # admin node ip address
region: default # upstream mirror region: default,china,europe
node_tune: oltp # node tuning specs: oltp,olap,tiny,crit
pg_conf: oltp.yml # pgsql tuning specs: {oltp,olap,tiny,crit}.yml
infra_portal: # domain names and upstream servers
home : { domain: h.pigsty }
grafana : { domain: g.pigsty ,endpoint: "${admin_ip}:3000" , websocket: true }
prometheus : { domain: p.pigsty ,endpoint: "${admin_ip}:9090" }
alertmanager : { domain: a.pigsty ,endpoint: "${admin_ip}:9093" }
blackbox : { endpoint: "${admin_ip}:9115" }
loki : { endpoint: "${admin_ip}:3100" }
#----------------------------------#
# Ivory SQL Configuration
#----------------------------------#
pg_mode: ivory # IvorySQL Oracle Compatible Mode
pg_version: 16 # The current IvorySQL compatible major version is 16
pg_packages: [ 'ivorysql patroni pgbouncer pgbackrest pg_exporter pgbadger vip-manager' ]
pg_libs: 'liboracle_parser, pg_stat_statements, auto_explain'
pgbackrest_enabled: false # got checksum error when using oracle compatible mode
repo_modules: node,pgsql,infra,ivory
repo_packages: [ node-bootstrap, infra-package, infra-addons, node-package1, node-package2, pgsql-utility ] #docker
repo_extra_packages: [ ivorysql ] # replace default postgresql kernel with ivroysql packages
注意事项
请注意,IvorySQL 仅在 EL 7/8/9 上可用,目前 EL7 因为过保,官方已经不再提供支持。
IvorySQL 提供 x86_64
(amd64) 与 aarch64
(arm64) 的 RPM 包,但 EL7 不提供 aarch64
架构的支持。
请注意,IvorySQL 目前版本兼容 PostgreSQL 16 大版本。
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.