AntDB上使用uuid
2019独角兽企业重金招聘Python工程师标准>>>
安装uuid相关依赖
sudo yum install -y uuid*
停止集群
adbmgr 进入:
stop all mode fast;
stop agent all;
重新编译antdb
../antdb/configure --prefix=/home/adb/antdb/app --with-ossp-uuid --with-perl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert CFLAGS="-DWAL_DEBUG -O2 -ggdb3 -fsigned-char"make install-world-contrib-recurse
configure 参数需要添加:--with-ossp-uuid
在adbhome下查找uuid相关文件
[adb@bogon ~]$ find antdb/app -name 'uuid*'
antdb/app/lib/postgresql/uuid-ossp.so
antdb/app/share/postgresql/extension/uuid-ossp--1.1.sql
antdb/app/share/postgresql/extension/uuid-ossp--unpackaged--1.0.sql
antdb/app/share/postgresql/extension/uuid-ossp.control
antdb/app/share/postgresql/extension/uuid-ossp--1.0--1.1.sql
antdb/app/include/postgresql/server/utils/uuid.h
[adb@bogon ~]$
启动antdb集群
adbmgr 进入:
deploy all;
start agent all;
start all;
记得要进行deploy,保证各个主机上的adbhome下都有uuid相关文件
创建uuid扩展
postgres=# create extension "uuid-ossp";
CREATE EXTENSION
postgres=# select * from pg_extension ;extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-----------+----------+--------------+----------------+------------+-----------+--------------plpgsql | 10 | 11 | f | 1.0 | | uuid-ossp | 10 | 2200 | t | 1.1 | |
(2 rows)
uuid已经安装成功。
查看uuid相关函数
postgres=# \df uuid_*List of functionsSchema | Name | Result data type | Argument data types | Type
------------+--------------------+------------------+---------------------------+--------pg_catalog | uuid_cmp | integer | uuid, uuid | normalpg_catalog | uuid_eq | boolean | uuid, uuid | normalpg_catalog | uuid_ge | boolean | uuid, uuid | normalpg_catalog | uuid_gt | boolean | uuid, uuid | normalpg_catalog | uuid_hash | integer | uuid | normalpg_catalog | uuid_in | uuid | cstring | normalpg_catalog | uuid_le | boolean | uuid, uuid | normalpg_catalog | uuid_lt | boolean | uuid, uuid | normalpg_catalog | uuid_ne | boolean | uuid, uuid | normalpg_catalog | uuid_out | cstring | uuid | normalpg_catalog | uuid_recv | uuid | internal | normalpg_catalog | uuid_send | bytea | uuid | normalpg_catalog | uuid_sortsupport | void | internal | normalpublic | uuid_generate_v1 | uuid | | normalpublic | uuid_generate_v1mc | uuid | | normalpublic | uuid_generate_v3 | uuid | namespace uuid, name text | normalpublic | uuid_generate_v4 | uuid | | normalpublic | uuid_generate_v5 | uuid | namespace uuid, name text | normalpublic | uuid_nil | uuid | | normalpublic | uuid_ns_dns | uuid | | normalpublic | uuid_ns_oid | uuid | | normalpublic | uuid_ns_url | uuid | | normalpublic | uuid_ns_x500 | uuid | | normal
(23 rows)postgres=# select uuid_generate_v1();uuid_generate_v1
--------------------------------------81eca584-8985-11e8-b2f3-080027cbfd68
(1 row)
转载于:https://my.oschina.net/yafeishi/blog/1858067
AntDB上使用uuid相关推荐
- AntDB上使用表空间
2019独角兽企业重金招聘Python工程师标准>>> 查看表空间的语法帮助 postgres=# \h create tablespace Command: CREATE TABL ...
- CGB2005 JT7-8(文件 图片上传 uuid生成文件名 静态代码块,反向代理,Nginx,Host文件,tomact集群实现项目发布 ,nginx负载均衡种类)
注意事项 1.京淘文件上传 文件上传api 京淘图片上传 利用静态代码块赋值 图片上传优化(动态赋值) uuid去掉横线 2.反向代理机制(正向反向代理说明) nginx学习 nginx实现反向代理 ...
- JAVA流水号生成规则,5位字符串,生成上千万uuid,使用0-9,A-Z36位来计算,按默认规则递增
因业务需要,原始uuid为5位,最多只支持10万条uuid,因业务量剧增,在不影响存量数据的情况下,需要拓展uuid,故将5位0-9的十进制规则,转换为0-9,A-Z36进制规则. 常规原则0000Z ...
- UUID的使用及其原理
今天敲项目要用UUID,想起之前老师告诉UUID的使用,但没说具体的生成逻辑,于是我进行了百度 首先,UUID的使用: //生成随机的UUID String uuid = UUID.randomUUI ...
- Possible MySQL server UUID duplication for server
在mysql enterprise monitor监控过程中出现这样的event事件,Topic: Possible MySQL server UUID duplication for serv ...
- SAP BTP 上使用 Mobile Back-End Tools(MBT)进行全栈开发的方法概述
Understand Full-Stack Development with Mobile Back-End Tools 从本质上讲,MBT 是一组工具,可让您无需编写一行代码即可生成功能齐全的 OD ...
- java uuid 效率_java uuid第一次性能
在java中产生uuid的方式是使用java.util.UUID. UUID.randomUUID().toString(); 我在测试redis性能时,使用uuid产生测试数据,发现多线程测试red ...
- C#使用七牛云存储上传下载文件、自定义回调
项目需要将音视频文件上传服务器,考虑并发要求高,通过七牛来实现. 做了一个简易的压力测试,同时上传多个文件,七牛自己应该有队列处理并发请求,我无论同时提交多少个文件,七牛是批量一个个排队处理了. 一个 ...
- The slave I/O thread stops because master and slave have equal MySQL server UUID
The slave I/O thread stops because master and slave have equal MySQL server UUIDs The slave I/O thre ...
最新文章
- Fragment与Activity的接口回调
- 统计机器学习第二章 感知机
- 1.7 元注解作用及使用
- ubuntu11.10 samba服务器配置
- 服务器 不支持gbk,解决JS请求服务器gbk文件乱码的问题
- java 异常 return_Java异常处理中同时有finally和return语句的执行问题
- atomicReference 的使用和AtomicStampedReference 解决ABA的问题
- TracKit-Ocean:目标跟踪网络(二) -- 运行问题及解决逻辑设计
- 深度神经网络 轻量化_正则化对深度神经网络的影响
- Linux:GCC安装与编译(详细)
- 利用git进行word文档的版本管理
- pycharm下django实战
- 在腾讯待了 9 年还离了职
- 音频在计算机里存储形式是什么,如何在录音带上存储任何类型的文件
- 趋势 |「酸性设计」到底有多酷?
- 2019-2020年度第2学期课程回顾总结
- IoT黑板报:美允许4G技术与WiFi共享5G频段
- apt-get: relocation error:/libapt-private.so.0.0 version APTPKG_5.0 not defined in file libapt-pkg
- JavaGUI编程 -- 窗口监听事件和键盘监听事件(AWT)
- 了不起的Node.js: 将JavaScript进行到底(Web开发首选,实时,跨多服务器,高并发)...