上一页 1 2 3 4 5 6 7 8 ··· 27 下一页
摘要: 原因:http://rabbitmq.1065348.n5.nabble.com/Unknown-delivery-tag-1-td33885.html https://stackoverflow.com/questions/9392478/error-unknown-delivery-tag-oc 阅读全文
posted @ 2022-09-09 17:44 zhjh256 阅读(43) 评论(0) 推荐(0) 编辑
摘要: [rabbitmq@hs-10-20-30-100 log]$ cat crash.log.0 2020-11-25 15:09:56 =ERROR REPORT ** Node 'rabbitmq@hs-10-20-30-99' not responding ** ** Removing (tim 阅读全文
posted @ 2022-09-09 17:43 zhjh256 阅读(95) 评论(0) 推荐(1) 编辑
摘要: 在postgresql 10支持声明式分区之前,分区是通过继承实现的,如下: CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int ); CREATE T 阅读全文
posted @ 2022-09-05 23:12 zhjh256 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 上一篇介绍了lightdb/postgresql public、pg_catalog schema的区别及pg_namespace概念,因为最近几个版本开发下来,遇到了很多兼容性挑战。所以这一节来专门讨论一下search_path,以及它是如何实现版本隔离和理论上可实现的租户隔离(实际上,light 阅读全文
posted @ 2022-09-04 21:12 zhjh256 阅读(304) 评论(0) 推荐(0) 编辑
摘要: CommandCounterIncrement的作用是使当前事务中前面语句的修改对本语句可见,相当于oracle中的当前读概念(current read,只不过oracle区分,pg不区分)。事务中每执行一个语句后,对后续语句都会直接可见。如下: zjh@postgres=# START TRANS 阅读全文
posted @ 2022-09-04 21:11 zhjh256 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 相比insert select,delete,如下: -- lightdb专有oracle匿名块写法 BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; insert into xx select xx from yy where id < xxx; 阅读全文
posted @ 2022-09-04 21:10 zhjh256 阅读(35) 评论(0) 推荐(0) 编辑
摘要: CREATE DOMAIN创建一个新的域。域 本质上是一种带有可选约束(在允许的值集合上的限制)的数据类型。 定义一个域的用户将成为它的拥有者。把它作为类型别名用是可以的,非常适合于行业软件。 如果给定一个模式名(例如CREATE DOMAIN myschema.mydomain ...),那么域将 阅读全文
posted @ 2022-09-04 21:09 zhjh256 阅读(254) 评论(0) 推荐(1) 编辑
摘要: PG中别名的实现包括AS 别名和不带AS的别名,实现为AS_LABEL和BARE_LABEL之分。BARE_LABEL是可以直接做列别名,AS_LABEL是必须带as或双引号。 关键字作为别名的实现,也需要区分为AS_LABEL或BARE_LABEL。在PG的实现中,绝大部分都实现为BARE_LAB 阅读全文
posted @ 2022-08-28 22:37 zhjh256 阅读(288) 评论(0) 推荐(0) 编辑
摘要: [lightdb@hs-10-20-30-199 ~]$ ltsql -p5432 ltsql (13.3-22.2) Type "help" for help. lightdb@postgres=# select show_samples(); show_samples (1,"2022-08-1 阅读全文
posted @ 2022-08-20 21:52 zhjh256 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 一般来说,现在为了各司其职,都把硬盘做成了san,raid,至少lvm。但是仍然有一些用户希望可以指定表空间和索引,当然也包括冷热数据。在lightdb里面也支持该特性。如下: lightdb@postgres=# create tablespace tab_tbs location '/data1 阅读全文
posted @ 2022-08-14 12:13 zhjh256 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 如果丢失了一些内容如application-data,可以先参考本链接http://www.wjhsh.net/chenjw-note-p-12956006.html安装。否则直接复制过来即可。 然后把老库导出来,导入新库。启动即可。 mysqldump -uroot -proot -h 127.0 阅读全文
posted @ 2022-08-05 20:04 zhjh256 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 本版本主要特性包括: 1、引入实验性特性oracle pl/sql存储过程兼容,兼容绝大部分oracle pl/sql一份代码可以同时运行于oracle和lightdb 2、lightdb jdbc支持autocommit=true时,fetchsize生效 3、lightdb优化器提示进一步完善, 阅读全文
posted @ 2022-07-21 17:07 zhjh256 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 先postgresql的页结构、页物理布局 postgresql 记录(元祖)物理布局 源码定义如下: struct HeapTupleHeaderData { union { HeapTupleFields t_heap; DatumTupleFields t_datum; }t_choice; 阅读全文
posted @ 2022-07-20 12:08 zhjh256 阅读(680) 评论(0) 推荐(0) 编辑
摘要: 在postgresql中,函数有个不稳定性分类属性,它会影响优化器评估函数的可优化级别、同时也会影响postgresql中并行执行的可行性。 函数有三种类型:VOLATILE、STABLE以及IMMUTABLE。VOLATILE是函数默认类别,也就是优化器假设函数会修改数据库,不会做任何特定的优化。 阅读全文
posted @ 2022-07-09 16:31 zhjh256 阅读(176) 评论(0) 推荐(0) 编辑
摘要: lightdb原生支持uuid(), sys_guid()函数。lightdb@postgres=# create table test_uuid(uuid_t uuid); CREATE TABLE lightdb@postgres=# insert into test_uuid values(u 阅读全文
posted @ 2022-07-05 21:03 zhjh256 阅读(322) 评论(0) 推荐(0) 编辑
摘要: zjh@postgres=# alter user zjh password '123456';ALTER ROLE 阅读全文
posted @ 2022-07-01 21:07 zhjh256 阅读(51) 评论(0) 推荐(0) 编辑
摘要: create server oradb foreign data wrapper oracle_fdw options (dbserver '//10.20.30.199:1521/test');create user mapping for USER server oradb options (u 阅读全文
posted @ 2022-07-01 15:58 zhjh256 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1、在Linux下获取CPU核数 linux下可以通过linux系统提供的sysconf()来获取当前CPU个数,sysconf在头文件unistd.h中声明。 sysconf函数中输入参数_SC_NPROCESSORS_CONF和_SC_NPROCESSORS_ONLN均可以获取系统CPU个数。 阅读全文
posted @ 2022-06-25 18:29 zhjh256 阅读(950) 评论(0) 推荐(0) 编辑
摘要: see https://dba.stackexchange.com/questions/239064/error-there-is-a-column-named-in-table-select-but-it-cannot-be-referenced and https://dba.stackexch 阅读全文
posted @ 2022-06-23 17:11 zhjh256 阅读(734) 评论(0) 推荐(0) 编辑
摘要: https://github.com/hslightdb/ora2pg oracle到lightdb迁移手册:https://www.hs.net/lightdb/docs/Oracle%20%E8%BF%81%E7%A7%BBLightDB%E7%94%A8%E4%BE%8B.pdf 阅读全文
posted @ 2022-06-23 16:00 zhjh256 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 迁移工具,lightdb增强版pgloader https://github.com/hslightdb/ltloader 修复了:1、convert varchar btree index to rum extension. 2、mysql auto_increment attribute mis 阅读全文
posted @ 2022-06-23 15:40 zhjh256 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 查看当前数据库 postgres=# select current_database(); current_database postgres (1 row) 查看数据库用户列表 postgres=# select * from pg_roles; rolname | rolsuper | roli 阅读全文
posted @ 2022-06-18 20:44 zhjh256 阅读(66) 评论(0) 推荐(0) 编辑
摘要: json-c是最主流的json c库。[root@hs-10-20-30-193 build]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. -- The C compiler identification is GNU 4.8.5 -- Check for 阅读全文
posted @ 2022-06-18 20:36 zhjh256 阅读(159) 评论(0) 推荐(0) 编辑
摘要: lightdb内置函数可生成 [zjh@hs-10-20-30-193 data]$ ltsql -p9999 ltsql (13.3-22.2) Type "help" for help. zjh@postgres=# select round(random() * 10000000,2); ro 阅读全文
posted @ 2022-06-18 16:24 zhjh256 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 有些时候,我们需要在测试时进行sleep,以便判断tps,oracle中如下: SELECT count(1) FROM scott.users; BEGIN DBMS_LOCK.sleep (1); END; / SELECT count(1) FROM scott.users; 需要sys登录先 阅读全文
posted @ 2022-06-18 16:19 zhjh256 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 在lightdb/pg中,事务是自动提交的,也就是除非明确通过BEGIN;开启事务,否则任何语句都是独立事务。在ltsql客户端,可以通过\echo :AUTOCOMMIT查看自动提交模式,如下: [zjh@hs-10-20-30-193 ~]$ ltsql -p9999 ltsql (13.3-2 阅读全文
posted @ 2022-06-11 20:55 zhjh256 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 先看postgresql中的匿名块do $$ declare i record; begin for i in 100000..300000 loop insert into scott.departments select 100000 + i, 'dept' || 100000 + i, now 阅读全文
posted @ 2022-06-04 15:57 zhjh256 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 因为开发不规范,DBA和架构师们通常会制定各种开发规范。比如关键字不能作为标识符,必须包含主键、最后修改时间、创建时间等。虽然规范很多,但是执行的时候通常会大打折扣,因为有大量的客户端可以连接数据库,没有足够的保障机制和制度。为了确保规范的落地,lightdb内置了开发规范校验特性,对于不符合规范的 阅读全文
posted @ 2022-05-28 22:44 zhjh256 阅读(67) 评论(0) 推荐(0) 编辑
摘要: [lightdb@hs-10-20-30-199 ~]$ lt_initdb -p9876 -D lightdb22.1-data The files belonging to this database system will be owned by user "lightdb". This us 阅读全文
posted @ 2022-05-26 15:04 zhjh256 阅读(67) 评论(0) 推荐(0) 编辑
摘要: [zjh@hs-10-20-30-193 ~]$ lt_ctl -D lightdb-x-dev-server/data stop #停止 waiting for server to shut down............................... done server stopp 阅读全文
posted @ 2022-05-26 14:46 zhjh256 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1、sysbench可用于测试mysql和lightdb性能。首先安装lightdb,可参考https://www.cnblogs.com/zhjh256/p/15170255.html或https://www.hs.net/lightdb/docs/LightDB_Install_Manual.p 阅读全文
posted @ 2022-05-25 15:46 zhjh256 阅读(144) 评论(0) 推荐(0) 编辑
摘要: [root@hs-10-20-30-199 ~]# su - lightdb Last login: Wed May 25 13:16:32 CST 2022 from 10.188.120.129 on pts/10 [lightdb@hs-10-20-30-199 ~]$ ltsql ltsql 阅读全文
posted @ 2022-05-25 13:29 zhjh256 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 0、LightDB是基于PostgreSQL最新版的企业发行版,类似于redhat与linux内核的关系。 1、首先从lightdb官网www.hs.net/lightdb下载对应操作系统和CPU架构的版本,比如centos x86或kylinv10 arm; 2、然后安装手册或快速入门安装ligh 阅读全文
posted @ 2022-05-25 13:02 zhjh256 阅读(122) 评论(0) 推荐(0) 编辑
摘要: [root@hs-10-20-30-199 bin]# pstack 48430 #0 0x00007fbd9375a62e in strcoll_l () from /lib64/libc.so.6 #1 0x000000000087bc82 in varstrfastcmp_locale (a1 阅读全文
posted @ 2022-05-24 17:36 zhjh256 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 原本被寄予厚望的64位xid,因提交的patch多少不是非常完美,最后修订版的提交日期为5.13,考虑各种时间问题。该特性被推迟到16版本。 PostgreSQL 15 的第一个 beta 版本现已可供下载。公告指出,此版本包含 PostgreSQL 15 普遍可用时将提供的所有功能的预览,但该版本 阅读全文
posted @ 2022-05-21 19:08 zhjh256 阅读(285) 评论(0) 推荐(0) 编辑
摘要: PostgreSQL 全球开发组针对当前所有被支持版本发布了一次更新,版本包括:PostgreSQL 14.3、13.7、12.11、11.16 和 10.21。此次更新修复了一个安全漏洞并修复了过去三个月报告的 50 多个错误。 如果你在使用 ltree 数据类型的列上有任何 GiST 索引,你将 阅读全文
posted @ 2022-05-16 08:35 zhjh256 阅读(215) 评论(0) 推荐(0) 编辑
摘要: LightDB产品团队于近期更新了MySQL/mariadb到LightDB开发迁移指南,相比LightDB 21.3版本,迁移便利性大大增加。涵盖范围包括: 详细可参见https://www.hs.net/lightdb/docs/LightDB%20compare%20with%20MySQL( 阅读全文
posted @ 2022-05-14 21:28 zhjh256 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 一、postgresql中的序列 1.1 场景需求 需要向下图一样,需要对产品编码编码设置一个序列。编码规则 SKU + 序列号: 1.2 序列 序列是基于bigint算法的,因此范围是不能超过一个八字节 整数的范围(-9223372036854775808 到 922337203685477580 阅读全文
posted @ 2022-05-14 21:20 zhjh256 阅读(65) 评论(0) 推荐(0) 编辑
摘要: void getCurrentDateTime(char* current_datetime) { time_t nowtime; struct tm* timeinfo; time(&nowtime); timeinfo = localtime(&nowtime); int xtn = timei 阅读全文
posted @ 2022-05-11 11:21 zhjh256 阅读(183) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>io.github.hslightdb</groupId> <artifactId>lightdb-jdbc</artifactId> <version>42.2.24</version> </dependency lightdb jdbc是专门为ligh 阅读全文
posted @ 2022-05-10 09:39 zhjh256 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 27 下一页