Compare commits

..

259 Commits

Author SHA1 Message Date
opengauss-bot 5c97f84e91
!2984 issue修复:gs_basebackup命令写入stdout执行失败修复
Merge pull request !2984 from zhangzhixian/3.0.0-basebackup-issue
2023-03-03 10:01:27 +00:00
opengauss-bot 68447494a4
!3012 修复流式容灾搭建过程中可能出现的core问题
Merge pull request !3012 from 薛蒙恩/sdr303
2023-03-03 09:47:21 +00:00
xue_meng_en 2951c00316 修复流式容灾导致的core问题 2023-03-02 14:55:58 +08:00
teooooozhang f2b1038e12 issue修复:gs_basebackup命令写入stdout执行失败修复 2023-03-02 10:04:20 +08:00
opengauss-bot e9310d2976
!2961 回合PR:https://gitee.com/opengauss/openGauss-server/pulls/2680
Merge pull request !2961 from 吴岳川/bugfix
2023-02-25 08:35:51 +00:00
wuyuechuan 7029e5f016 ignore opt field when computing hash value 2023-02-24 20:10:59 +08:00
opengauss-bot 88e9160ad0
!2809 修复使用nvarchar类型创建list分区,分区数据update,delete失败的bug
Merge pull request !2809 from Cross-罗/list_partition_bugfix
2023-01-17 01:51:23 +00:00
luozihao 404009bab0 修复 list partition的bug 2023-01-13 14:50:03 +08:00
opengauss-bot 46134f7305
!2716 修复升级过程中drop extension报错
Merge pull request !2716 from 杨皓/3.0.0-1
2022-12-30 12:31:04 +00:00
yanghao 5f6c9616a6 fix problem that hdfs_fdw cannot drop while upgrade 2022-12-30 17:43:43 +08:00
opengauss-bot f5c8dfd75b
!2710 修复升级时drop extension hdfs_fdw出错问题
Merge pull request !2710 from maxiang/3.0.0
2022-12-30 08:27:24 +00:00
maxiang fd2d247b4c
update src/gausskernel/optimizer/commands/dropcmds.cpp.
修复升级时drop extension hdfs_fdw出错问题

Signed-off-by: maxiang <maxiang9527@126.com>
2022-12-30 06:32:42 +00:00
opengauss-bot 38973b0519
!2663 修复升级hdfs_fdw创建失败问题
Merge pull request !2663 from 杨皓/3.0.0
2022-12-21 06:15:32 +00:00
yanghao a393a0988a fix problem in upgrade 2022-12-20 18:00:23 +08:00
opengauss-bot eb6f124dee
!2653 【bugfix】 修复3.0.3版本 轻量版编译报错的问题
Merge pull request !2653 from 周聪/lite_cmake_fail
2022-12-20 09:03:53 +00:00
congzhou2603 1a512ca82d 【bugfix】 修复轻量版编译报错的问题 2022-12-20 11:43:59 +08:00
opengauss-bot 8106e23629
!2626 修复2.0.0升级3.0.1版本,升级报错问题
Merge pull request !2626 from 杨皓/3.0.0
2022-12-16 03:21:51 +00:00
opengauss-bot 2142246c60
!2634 修复switchover -f不生效问题
Merge pull request !2634 from 熊小军/3.0.0
2022-12-15 01:40:47 +00:00
xiong_xjun f6cd6f650e extremely fast switchover 2022-12-14 20:05:17 +08:00
yanghao bd163157ad fix problem that upgrade rollback failed 2022-12-14 16:19:50 +08:00
opengauss-bot 6584b8ff9e
!2620 update version to 3.0.3
Merge pull request !2620 from zhangxubo/3.0.0
2022-12-13 12:57:53 +00:00
zhang_xubo 47d345bc83 update version to 3.0.3 2022-12-13 20:41:55 +08:00
opengauss-bot 3791143129
!2583 【master回合3.0.0】发布订阅支持以二进制格式发送数据和主备切换不断开
Merge pull request !2583 from 薛蒙恩/pubsub300
2022-12-13 01:22:44 +00:00
opengauss-bot 1eee74fc30
!2571 [master分支回合3.0] master分支的4个PR回合至3.0分支
Merge pull request !2571 from cchen676/ms30
2022-12-12 13:23:31 +00:00
xue_meng_en 4d1c7b1a82 修复升级后subbinary为空导致发布订阅报错问题 2022-12-12 17:42:48 +08:00
xue_meng_en 6ffadffa5c 发布订阅支持主备切换不断开 2022-12-12 17:42:23 +08:00
xue_meng_en eec3c1d634 发布订阅支持以二进制格式发送数据 2022-12-12 17:40:16 +08:00
opengauss-bot c7e3c702a2
!2586 [回合]修改 upgrade后 gs_dump、gs_restore的错误和fix pg_control_system
Merge pull request !2586 from zhengxue/3.0.0_dev
2022-12-12 06:32:17 +00:00
opengauss-bot 98fc84f790
!2545 3.0.0版本代码回合,解决issue -- 关闭质量检查点,开启全页写,无负载情况下,create database花费25秒
Merge pull request !2545 from zhaobingyu/issue1891
2022-12-12 02:33:00 +00:00
opengauss-bot d1cb9a377f
!2577 【3.0.0回合】修复从2.0.1升级到最新,回滚失败问题
Merge pull request !2577 from 周聪/rollback_fail
2022-12-12 02:24:54 +00:00
opengauss-bot a7daf5ac3e
!2549 3.0.0 回合 更新轻量版构建脚本以及最新三方库二进制文件
Merge pull request !2549 from 周聪/3.0.0_lightweight_scirpt_4.0
2022-12-12 02:24:47 +00:00
opengauss-bot bad6703ab1
!2558 3.0.0 回合 gs_ctl restore后未加break导致会执行copy操作
Merge pull request !2558 from 周聪/restore_no_copy
2022-12-12 02:20:03 +00:00
opengauss-bot 692cd93a19
!2575 【3.0.0回合】 numactl库未打包到openGauss发布包里面,导致容器安装时候失败
Merge pull request !2575 from 周聪/3.0.0_numactl_package
2022-12-12 02:18:51 +00:00
opengauss-bot ccd3eceecc
!2546 3.0.0回合 添加对asianux平台支持
Merge pull request !2546 from 周聪/3.0.0-add_asianux
2022-12-12 02:18:14 +00:00
opengauss-bot e8a0efc9c0
!2587 [回合]解决maintainer-clean之后无法找到hint_gram.hpp的编译错误
Merge pull request !2587 from zhengxue/3.0.0_dev1
2022-12-10 09:31:48 +00:00
opengauss-bot cccbdebfbf
!2592 【3.0.0回合】gs_guc reload概率性导致备机core问题修复
Merge pull request !2592 from zhangzhixian/3.0.0-gs_guc_reload_fix
2022-12-10 06:39:35 +00:00
congzhou2603 54e8b987b2 【3.0.0 回合】修复从2.0.1升级到最新,回滚失败问题 2022-12-09 10:59:54 +08:00
teooooozhang 5e0f4cdc3b 【3.0.0回合】gu_guc reload概率性产生内存越界问题修复 2022-12-09 10:31:18 +08:00
ashnah 9e884c1073 fix error on gs_dump and gs_restore after upgrade 2022-12-08 22:32:22 +08:00
vastdata-xyzr 3276228499 解决maintainer-clean之后无法找到hint_gram.hpp的编译错误 2022-12-08 22:24:39 +08:00
opengauss-bot a0c190f19b
!2540 master回合3.0.0
Merge pull request !2540 from 薛蒙恩/og300
2022-12-08 12:11:29 +00:00
opengauss-bot f87c380fea
!2548 3.0.0代码回合:配置非异步备库且使用全量检查点,主库gs_ctl stop失败
Merge pull request !2548 from zhaobingyu/issue1921
2022-12-08 08:56:03 +00:00
opengauss-bot 84801fc880
!2574 【回合3.0.0】openGauss 发布订阅支持gs_probackup备份恢复后连接不断开
Merge pull request !2574 from chenxiaobin/basebackup300
2022-12-08 08:25:27 +00:00
opengauss-bot f33c2bca58
!2570 【3.0.0 bugfix回合】2.0.1灰度升级回滚后残留视图local_active_session修复
Merge pull request !2570 from zhangzhixian/3.0.0_merge_update_fix
2022-12-08 08:24:50 +00:00
opengauss-bot 1d0cca0689
!2561 【3.0.0 bugfix回合】xgboost内存泄漏修复回合
Merge pull request !2561 from zhangzhixian/3.0.0-I5T7WS
2022-12-08 08:23:57 +00:00
opengauss-bot cd329d4636
!2538 【master回合3.0.0】解决问题 审计日志写满后反转失败
Merge pull request !2538 from Cross-罗/cherry-pick-1670227232
2022-12-08 08:03:53 +00:00
opengauss-bot feb32b6c04
!2535 【master回合3.0.0】修复groupby cube中出现重复字段时聚集结果错误的问题。
Merge pull request !2535 from Cross-罗/cherry-pick-1670226634
2022-12-08 08:03:44 +00:00
opengauss-bot fb6329d9d6
!2536 【master回合3.0.0】修改升级后视图权限丢失问题
Merge pull request !2536 from Cross-罗/cherry-pick-1670226723
2022-12-08 07:47:14 +00:00
opengauss-bot a0fae7338c
!2516 【2.0.0回合3.0.0】gs_probackup对应walsender的超时时间改为至少30分钟,确保备份不因超时而失败
Merge pull request !2516 from Cross-罗/3.0.0_walsender_30min
2022-12-08 07:46:36 +00:00
opengauss-bot 41125fd93d
!2537 【master回合3.0.0】修复带有agg的查询在计划化简时目标列类型处理问题
Merge pull request !2537 from Cross-罗/cherry-pick-1670227138
2022-12-08 07:46:17 +00:00
opengauss-bot d9c1282ff4
!2565 【master回合3.0.0】双写页面排序函数存在无效代码,页面索引无法影响排序结果
Merge pull request !2565 from Cross-罗/PR_2250
2022-12-08 07:45:40 +00:00
opengauss-bot 044f55ab0b
!2534 【master回合3.0.0】修复类型转换使用时容易产生大量打印日志的问题
Merge pull request !2534 from Cross-罗/cherry-pick-1670226539
2022-12-08 07:42:50 +00:00
opengauss-bot 3aa0d7736a
!2533 【master回合3.0.0】修复merge into全局临时表报表文件不存在的bug
Merge pull request !2533 from Cross-罗/cherry-pick-1670226425
2022-12-08 07:42:25 +00:00
arcoalien@qq.com fecdeb4f99 新特性:gs_probackup备份支持zstd压缩算法
new feature: gs_probackup support zstd compress algrithom
2022-12-08 15:27:46 +08:00
opengauss-bot ff7124c0bd
!2569 set role of basebackup to SNDROLE_PRIMARY_BUILDSTANDBY
Merge pull request !2569 from 吴岳川/3.0.2
2022-12-08 03:24:39 +00:00
opengauss-bot 76491de228
!2573 【回合3.0.0】修复主机pitr恢复后清理xlog日志不完全的问题
Merge pull request !2573 from chenxiaobin/3.0.0
2022-12-08 03:17:36 +00:00
opengauss-bot f916fcd84e
!2550 回合部分问题修复到3.0.0
Merge pull request !2550 from 胡正超/300merge
2022-12-08 01:56:11 +00:00
opengauss-bot 38802d405a
!2544 【master回合3.0.0】回合PR1806,1880,1910,2020,2219五个PR
Merge pull request !2544 from 吴岳川/3.0.0
2022-12-08 01:49:59 +00:00
congzhou2603 1a6ee507cc 【3.0.0回合】 numactl库未打包到openGauss发布包里面,导致容器安装时候失败 2022-12-07 21:10:41 +08:00
chenxiaobin19 7552d5a3a7 gs_probackup支持备份发布订阅的逻辑复制槽 2022-12-07 19:17:01 +08:00
chenxiaobin19 e52a1eb067 fix xlog file does not clean enough after pitr-recovering when using RECOVERY_TARGET_XID\NAME\TIME 2022-12-07 18:25:00 +08:00
wenger ddd954bd3c 修复增量build时实际发生全量build的缺陷
增量build时,会计算源端与目标端的差异,此处没有对目标端文件大小进行赋值(即oldsize)变量,oldsize默认为0,这导致实际发生了全量build
2022-12-07 15:53:52 +08:00
dbxue 0413e7f1b0 new feature: add lz4 compress algrithom to gs_probackup 2022-12-07 15:52:24 +08:00
dbxue df6a619b4c bugfix: gs_probackup always fail when backup exceed 10min 2022-12-07 15:49:44 +08:00
teooooozhang 897ea8b9fb 【3.0.0 bugfix回合】升级回滚后视图local_active_session残留 2022-12-07 14:14:18 +08:00
opengauss-bot e39c152f65
!2562 【3.0.0 bugfix回合】fix并发改config文件导致coredump
Merge pull request !2562 from 陈栋/merge2
2022-12-07 06:06:16 +00:00
wuyuechuan 62e42c25d3 set role of basebackup to SNDROLE_PRIMARY_BUILDSTANDBY 2022-12-07 11:14:47 +08:00
luozihao cd1b328e22 双写页面排序函数存在无效代码,页面索引无法影响排序结果 2022-12-06 21:13:51 +08:00
opengauss-bot 8922430919
!2510 【master -> 3.0.0】【存储】【压缩特性代码】执行toast表并发测试,集群主DN进程core
Merge pull request !2510 from laishenghao/3-toast
2022-12-06 12:26:50 +00:00
opengauss-bot b4c82fb41c
!2508 【master -> 3.0.0】修改entrypoint.sh文件里包含口令硬编码
Merge pull request !2508 from laishenghao/cherry-pick-1669789117
2022-12-06 12:26:28 +00:00
opengauss-bot 6346315bfe
!2559 【3.0.0 bugfix回合】回合master部分bugfix至3.0.0
Merge pull request !2559 from 陈栋/merge1
2022-12-06 11:49:14 +00:00
Wenke Yang baa1414993 link #I57IE7 fixed concurrent modify config file bug 2022-12-06 19:04:32 +08:00
teooooozhang 90c8169f18 【3.0.0 bugfix回合】xgboost内存泄漏修复回合 2022-12-06 17:36:59 +08:00
林科旭 06d4c6ee4a fix retry open pcd file 2022-12-06 17:27:08 +08:00
jiaolanlan@gbase.cn 66244cdee0 fix accessing of dangling pointer in session_options 2022-12-06 17:26:08 +08:00
gw115 01bc7a3f5d syn code for workload index advisor 2022-12-06 17:24:54 +08:00
Min Sun 63080b2d37 Update regress test hw_cipher_sm4 to fix the issue of gs_decrypt having two lines results 2022-12-06 17:23:47 +08:00
flyly c5e88b3be7 Implementing Monte Carlo Tree Search Algorithm 2022-12-06 17:17:06 +08:00
林科旭 800396f61b fix retry open pcd file 2022-12-06 15:17:22 +08:00
opengauss-bot 2e691bd9cd
!2528 3.0.0 代码回合 修复SQL语句中同时出现窗口函数和子查询时因子查询被提升导致执行失败的问题
Merge pull request !2528 from 周聪/3.0.0
2022-12-06 07:07:50 +00:00
congzhou2603 4d633b8364 3.0.0 回合 gs_ctl restore后未加break导致会执行copy操作 2022-12-06 14:58:55 +08:00
gentle_hu cd9f6b490c fix core about log_destination 2022-12-06 10:42:03 +08:00
congzhou2603 7c57e5975b 3.0.0 回合 更新轻量版构建脚本以及最新三方库二进制文件 2022-12-05 22:05:10 +08:00
zhaobingyu a976745182 3.0.0代码回合:配置非异步备库且使用全量检查点,主库gs_ctl stop失败 2022-12-05 20:59:36 +08:00
congzhou2603 e0241f088b 3.0.0回合 添加asianux平台支持 2022-12-05 19:57:18 +08:00
zhaobingyu 3afb086f4d 3.0.0版本代码回合,解决issue -- 关闭质量检查点,开启全页写,无负载情况下,create database花费25秒 2022-12-05 19:51:10 +08:00
wuyuechuan a81495043c cherry-pick conflict 2022-12-05 19:38:26 +08:00
wuyuechuan 2544f59021 column table: set compress/nocompress support
Conflicts:
	src/test/regress/parallel_schedule0
2022-12-05 19:35:54 +08:00
wuyuechuan 653b534bd2 column table: set compress/nocompress support
Conflicts:
	src/test/regress/parallel_schedule0
2022-12-05 19:34:01 +08:00
wuyuechuan f042f6fe7c change_function_from_defGetBoolean_to_parse_bool 2022-12-05 19:30:53 +08:00
wuyuechuan 288cd473c3 memcheck bugfix
Conflicts:
	src/common/backend/utils/cache/knl_localsysdbcache.cpp
2022-12-05 19:30:38 +08:00
xue_meng_en a1559e3e8b 修复slot_name包含特殊字符报错信息不正确问题 2022-12-05 16:29:49 +08:00
xue_meng_en 7335c381a7 修复复制槽名称长度为64,65时提示创建复制槽成功但是复制槽不存在的偶现问题 2022-12-05 16:28:43 +08:00
zhoutianlian 40e02971c2 fixed 42623fc from https://gitee.com/luo_zihao5524/openGauss-server/pulls/2247
新增 earliest_idx 为负的场景下,pgaudit_totalspace的计算方法

Signed-off-by: zhoutianlian <zhoutianlian@huawei.com>
2022-12-05 08:00:32 +00:00
cc_db_dev a53d22a0ad fixed 36dd9b2 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/2084
修复带有恒为假条件的agg在计划化简是目标列类型处理问题
2022-12-05 07:58:59 +00:00
zhaofeng64 dc21219e6d fixed 8a44a89 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/2225
solve the problem of permission loss after upgrade
2022-12-05 07:52:04 +00:00
luozihao c1e1948931 fixed e7e7117 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/2122
修复groupby cube中出现重复字段时聚集结果错误的问题。
2022-12-05 07:50:34 +00:00
Cross-罗 6b32ac9484 fixed f0f9570 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/2045
update src/common/pl/plpgsql/src/pl_handler.cpp.

Signed-off-by: Cross-罗 <1165977584@qq.com>
2022-12-05 07:48:59 +00:00
luozihao 3f7bf26194 fixed 6809622 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/1959
修复merge全局临时表的bug
2022-12-05 07:47:06 +00:00
opengauss-bot 1894187ba7
!2531 【bugfix回合】回合master上的内存泄漏问题
Merge pull request !2531 from pengjiong/3.0.0
2022-12-05 06:39:08 +00:00
totaj 2a078bf0b8 Fix memleak.
Conflicts:
	src/gausskernel/optimizer/commands/trigger.cpp
2022-12-05 11:32:00 +08:00
TotaJ a45bfae25a Fix memleak.
Conflicts:
	src/bin/pg_dump/pg_dump.cpp
2022-12-05 11:03:38 +08:00
congzhou2603 39e0320615 3.0.0回合 修复SQL语句中同时出现窗口函数和子查询时因子查询被提升导致执行失败的问题 2022-12-03 18:06:49 +08:00
opengauss-bot 7d3b2c03c3
!2496 【3.0.0回合】修复设置try_vector_engine_strategy参数为force后,查询目标列含系统表的查询出现coredump的问题
Merge pull request !2496 from 仲夏十三/mas8
2022-12-01 09:02:36 +00:00
luozihao 0c469e5f2a set wal_sender_timeout >= 30minutes for gs_probackup 2022-12-01 10:34:58 +08:00
laishenghao e7a99b76c1 【master -> 3.0.0】【存储】【压缩特性代码】执行toast表并发测试,集群主DN进程core 2022-11-30 17:58:11 +08:00
ganyang 79de533005 fix coredump select system domain type in vec mode 2022-11-30 15:51:56 +08:00
lihongda 0039280728 fixed c34605a from https://gitee.com/dodders/openGauss-server/pulls/2189
update docker/dockerfiles/3.0.0/entrypoint.sh fix entrypoint.sh文件里包含口令硬编码 . 

Signed-off-by: lihongda <hongda.li@enmotech.com>
2022-11-30 06:18:37 +00:00
opengauss-bot 332fc7da41
!2421 修复\h ALTER PROCEDURE查询存储过程帮助语法不存在和\h alter中缺少PROCEDURE的语法的问题
Merge pull request !2421 from yuchao/3.0.0
2022-11-26 07:29:08 +00:00
opengauss-bot 92dfe1863e
!2428 同步问题修复
Merge pull request !2428 from 杨皓/3.0.0
2022-11-18 06:27:17 +00:00
opengauss-bot 74914a8da7
!2443 [bug fix] 修复postgresql.conf里面配置了多个参数后,pg_rewind里面用的第一个参数取值进行校验的问题
Merge pull request !2443 from cchen676/ms30
2022-11-17 01:45:47 +00:00
opengauss-bot b53f15e104
!2311 回合3.0.0 fix IdleInTransactionSessionTimeout don't work when session_timeout=0
Merge pull request !2311 from 薛蒙恩/idle302
2022-11-16 12:59:59 +00:00
arcoalien@qq.com 55cebcb77f 修复conf文件里面配置了多个参数时取第一个判断的问题 2022-11-16 17:21:06 +08:00
zhang_xubo 6095f81310 update zlib and jdk path 2022-11-15 16:41:33 +08:00
openGaussDev bffa58e13e sync code for bugfix 2022-11-15 11:17:50 +08:00
opengauss-bot 2e621a804f
!2384 [bug fix] 修复enable_save_confirmed_lsn打开后,动态开启最大可用模式配置发生coredump的问题
Merge pull request !2384 from cchen676/ms30
2022-11-14 03:03:51 +00:00
xue_meng_en f53c24ea8b 修复idle_in_transaction相关问题回合3.0.0 2022-11-11 20:51:19 +08:00
opengauss-bot 3a9585c0b0
!2383 bugfix回合3.0.0:删除指定summary级别时,wdr内的存在的detail信息
Merge pull request !2383 from 胡正超/3.0.0
2022-11-11 03:29:59 +00:00
Yu Chao c8f5943251 修复\h alter procedure查询存储过程帮助语法不存在的问题 2022-11-10 19:55:17 +08:00
opengauss-bot 3c344a205f
!2394 reset useless chunk when backup file
Merge pull request !2394 from 吴岳川/comp
2022-11-10 07:55:24 +00:00
opengauss-bot 9b108988a6
!2391 回合master关于db4ai.snapshot系统表的升级脚本
Merge pull request !2391 from zhengxue/3.0.0_dev
2022-11-09 08:22:08 +00:00
opengauss-bot 15060bf00f
!2397 计算RelFileNode的hash值时忽略opt字段
Merge pull request !2397 from chenxiaobin/3.0.0
2022-11-09 03:16:47 +00:00
wuyuechuan 4c8204e7f4 reset useless chunk when backup file 2022-11-08 16:19:28 +08:00
chenxiaobin19 3a848f7323 ignore opt field when computing hash value 2022-11-08 11:35:41 +08:00
arcoalien@qq.com 7efcd00a66 修复enable_save_confirmed_lsn打开后,动态开启最大可用模式coredump的buf 2022-11-08 09:30:44 +08:00
opengauss-bot 44a75e3e28
!2385 将copy指令的\h 信息修改合到3.0.0分支
Merge pull request !2385 from laishenghao/cherry-pick-1667612241
2022-11-07 08:55:25 +00:00
shirley_zhengx 6530335e38 回合master关于db4ai.snapshot系统表的升级脚本 2022-11-07 16:24:14 +08:00
Laishenghao e621c4edd7 fixed 1bcae14 from https://gitee.com/dodders/openGauss-server/pulls/2176
修改copy 指令的 help信息
2022-11-05 01:37:21 +00:00
gentle_hu 227d200aba rm detail info in wdr when summary type is specified 2022-11-04 16:19:19 +08:00
opengauss-bot 9a805c2eef
!2323 虚拟索引oid最大值设定
Merge pull request !2323 from guoguozhenhaowan/index_oid
2022-10-31 12:16:34 +00:00
opengauss-bot 0c77d0027e
!2319 修复gsql无法在openGauss2.0上执行"\d+ table"的问题
Merge pull request !2319 from 杨浩/3.0.0
2022-10-27 07:55:52 +00:00
opengauss-bot 12ba820996
!2334 修复package编译爆栈bug
Merge pull request !2334 from pengjiong/3.0.0_bugfix
2022-10-27 03:24:33 +00:00
yanghao bf074c9975 Fix "\d+ table" cannot be executed in openGauss 2.0 2022-10-27 10:08:52 +08:00
totaj e883989fb2 Fix nest package. 2022-10-26 21:35:18 +08:00
nwen 8437e63439 fix: increase the maximum value of oid to avoid the bug of not being able to create hypo-index by too large oid 2022-10-24 15:07:58 +08:00
opengauss-bot ed8c0638ff
!2234 【patch】合入gs_dump报错问题相关修改
Merge pull request !2234 from laishenghao/gs_dump
2022-10-10 01:32:24 +00:00
Laishenghao f2fa1e1ba1 修改检视意见:末尾重置版本号为0,脚本文件增加‘-post’ 2022-10-09 17:23:59 +08:00
opengauss-bot b992e1957e
!2289 change version to 3.0.2
Merge pull request !2289 from zhangxubo/3.0.0
2022-10-09 09:17:39 +00:00
zhang_xubo 2798e7d19e update version to 3.0.2 2022-10-09 15:45:25 +08:00
Laishenghao 88ed60395a 【patch】合入gs_dump报错问题相关修改 2022-10-09 11:44:03 +08:00
opengauss-bot 54d7584191
!2278 修改 并发执行函数local_double_write_stat会触发coredump的问题
Merge pull request !2278 from ashnah/for_doublewriter_coredump
2022-10-08 01:38:07 +00:00
wangxiumin be6071eebd 把全局变量g_stat_file_id改为session级别 2022-09-30 19:37:59 +08:00
opengauss-bot 46b4dac18d
!2241 【patch】并行回放中 事务日志不再同步IsnMarker,减少同步开销
Merge pull request !2241 from laishenghao/parallel
2022-09-28 07:13:43 +00:00
opengauss-bot a0260b81fb
!2254 同步master修复smp core问题
Merge pull request !2254 from chenxiaobin/3.0.0
2022-09-27 14:04:57 +00:00
chenxiaobin19 3be0488ab1 fix problem that subplan recursive result not corrent in stream plan 2022-09-27 20:15:28 +08:00
opengauss-bot 9b7170c6c1
!2246 [回合]delta表支持autovacuum自动迁移至主表
Merge pull request !2246 from 陈栋/3.0.0
2022-09-26 08:38:41 +00:00
chendong76 28270e72ed [回合master]delta表支持autovacuum自动迁移至主表 2022-09-26 15:02:40 +08:00
Laishenghao 2f29eeae78 【patch】并行回放中 事务日志不再同步IsnMarker,减少同步开销 2022-09-26 10:13:25 +08:00
opengauss-bot 20c4bf07fe
!2238 同步master修改:预处理函数:错误计算长度导致部分场景可能数据会解压异常
Merge pull request !2238 from 吴岳川/compress
2022-09-26 01:35:40 +00:00
opengauss-bot 25cbdcf6ce
!2212 fix bug 修复enable_save_confirmed_lsn不能使用GUC SET设置的问题
Merge pull request !2212 from cchen676/ms30
2022-09-24 10:43:46 +00:00
wuyuechuan 6f091037b2 bugfix: the totalsize is incorrectly calculated 2022-09-24 16:24:42 +08:00
opengauss-bot a8f77a4678
!2230 【回合3.1.0代码】修复pg_get_tabledef()无法作用于系统表的问题
Merge pull request !2230 from 仲夏十三/three
2022-09-24 07:04:30 +00:00
ganyang 552ee3298a fix pg_get_tabledef 2022-09-23 16:36:35 +08:00
arcoalien@qq.com 683d8be157 fix bug 修复enable_save_confirmed_lsn不能使用GUC SET设置的问题 2022-09-22 09:03:16 +08:00
opengauss-bot 430acfbd84
!2204 hw_audit_detailinfo执行失败,需要对脚本添加可执行权限
Merge pull request !2204 from zhangxubo/3.0.0
2022-09-21 09:01:47 +00:00
opengauss-bot e605dc5aba
!2200 【回合】修复逻辑解码 waiting_for_ping_response 设置错误的问题
Merge pull request !2200 from pengjiong/cherry-pick-1663730805
2022-09-21 06:38:53 +00:00
zhang_xubo 04a116ea22 对fastcheck脚本添加可执行权限 2022-09-21 14:38:16 +08:00
totaj ad7eb165cf fixed 8af9abc from https://gitee.com/totaj/openGauss-server/pulls/2178
Fix logical decoding timeout.
2022-09-21 03:26:55 +00:00
opengauss-bot fbf4fc2861
!2194 支持idle_in_transaction_session_timeout回合3.0.0分支
Merge pull request !2194 from 薛蒙恩/idle300
2022-09-20 13:48:12 +00:00
xue_meng_en 616cf713ff 支持idle_in_transaction_session_timeout 2022-09-20 14:29:36 +08:00
opengauss-bot 12da7491f1
!2182 修复FDW const、param等不能下推的bug (回合自master)
Merge pull request !2182 from 胡正超/3.0.0
2022-09-17 09:11:46 +00:00
gentle_hu f1d24398d4 fix postgres fdw bug 2022-09-17 15:15:44 +08:00
opengauss-bot afdf9b9858
!2088 支持增量build时校验源端是否和目的端有相同的多数派一致性位置
Merge pull request !2088 from cchen676/ms30
2022-09-15 13:12:48 +00:00
cchen676 d2bcd8ca96 支持增量build时校验主备达成多数派一致性的位置 2022-09-14 19:02:24 +08:00
opengauss-bot 8179d400ae
!1915 [master分支回合]fix issue 列存表的delta表存在toast表时,vacuum deltamerge后无法访问
Merge pull request !1915 from cchen676/new3.0
2022-09-07 09:39:07 +00:00
opengauss-bot 0a568bd991
!2106 备机statement_history、full sql回合3.0.0
Merge pull request !2106 from 胡正超/3.0.0
2022-09-06 02:35:04 +00:00
gentle_hu aaac084d7f 回合2.0.0特性: fullsql特性增强代码
commits:
    cbfbaf4d53
    78a85d3900
    53b7a69a78
pr: 1807, 1826
2022-08-30 20:22:46 +08:00
gentle_hu 1ead26832f 回合2.0.0特性:support dbe_perf.standby_statement_history()
commits:
  e5acacfcc2
  abb65f9362

pr: 1783, 1809
2022-08-30 20:22:07 +08:00
gentle_hu 96c50c0a81 fix the bug of grpc lock initialization 2022-08-30 20:10:11 +08:00
opengauss-bot 3cfa51a9c1
!1968 解决issue-列存加唯一索引插100万数据慢问题
Merge pull request !1968 from zhaobingyu/3.0.0
2022-07-26 07:26:05 +00:00
zhaobingyu 5d67447ae3 解决3.0.0版本列存加唯一索引插100万数据慢问题 2022-07-25 14:58:38 +08:00
arcoalien@qq.com 654e407446 fix issue 列存表的delta表存在toast表时,vacuum deltamerge后无法访问 2022-07-01 10:44:13 +08:00
opengauss-bot 4f106fe8a3
!1913 【master回合3.0.0】1912 Reserve 160kb where backup compressed file
Merge pull request !1913 from 吴岳川/cherry-pick-1656577421
2022-06-30 11:00:11 +00:00
wuyuechuan 28c087e456 fixed 1e44cb5 from https://gitee.com/wuyuechuan/openGauss-server/pulls/1912
Reserve 160kb where backup compressed file
2022-06-30 08:23:42 +00:00
opengauss-bot ee99e11525
!1900 【代码回合】1792 压缩表建表提示优化、修改表拦截错误修改
Merge pull request !1900 from 吴岳川/300
2022-06-28 09:30:23 +00:00
wuyuechuan f3d1def27a optimize the message for `create table` 2022-06-27 17:40:06 +08:00
wuyuechuan 4ce17d47de change log of `alter compresstype\compress_chunk_size` 2022-06-27 17:39:58 +08:00
opengauss-bot cbeba1779e
!1894 修复主备来回切换,数据库core掉
Merge pull request !1894 from zhangxubo/3.0.0
2022-06-27 01:58:27 +00:00
zhang_xubo 52d009c6ae 修复主备间来回切换,数据库core掉问题 2022-06-26 17:22:28 +08:00
opengauss-bot 70838dbbab
!1892 Undo加固增强:enable_ustore=off时候,AllocateUndoZone直接返回
Merge pull request !1892 from zhangxubo/3.0.0
2022-06-24 08:46:31 +00:00
zhang_xubo 714954a06f enable_ustore=off加固处理AllocateUndoZone直接返回 2022-06-24 15:23:20 +08:00
opengauss-bot 50db19b62c
!1879 [bufix]修复 master 分支 和 3.0.0 分支创建 postgis_raster 扩展失败问题
Merge pull request !1879 from 周斌/postgis_raster
2022-06-22 03:55:14 +00:00
wusong a7dae44b62 fix #I51OZS 修复在扩展中无法调用已创建函数问题,sort_candidate_func_list 函数实现 bug 2022-06-22 10:50:19 +08:00
opengauss-bot 6fc31000c6
!1877 change version to 3.0.1 in branch 3.0.0
Merge pull request !1877 from zhangxubo/3.0.0
2022-06-21 15:04:30 +00:00
zhang_xubo b11082c4af change version to 3.0.1 2022-06-21 21:39:57 +08:00
opengauss-bot 7ab4eebf6a
!1841 回合bugfix: 修复ustore二级分区以及生成列场景下,发布订阅数据同步失败的问题
Merge pull request !1841 from pengjiong/cherry-pick-1655430243
2022-06-21 12:22:17 +00:00
opengauss-bot e911707543
!1839 回合bugfix: 修复视图中包含自定义操作符时,获取视图定义失败的问题
Merge pull request !1839 from pengjiong/cherry-pick-1655429759
2022-06-21 12:16:44 +00:00
opengauss-bot 89b6c03df0
!1840 回合bugfix: 修复在部分场景下,非sysadmin用户执行gs_dump失败的问题
Merge pull request !1840 from pengjiong/cherry-pick-1655430205
2022-06-21 12:12:50 +00:00
opengauss-bot 96a41cfdd8
!1838 回合bugfix: 修复由于CurrentResourceOwner为NULL导致的逻辑解码core问题
Merge pull request !1838 from pengjiong/cherry-pick-1655429544
2022-06-21 12:11:47 +00:00
opengauss-bot 5df7418564
!1853 【3.0.0回合】1702 修复分区表issue
Merge pull request !1853 from 仲夏十三/cherry-pick-1655434375
2022-06-21 03:08:48 +00:00
opengauss-bot 4bfd4765e0
!1852 【3.0.0回合】1782 bugfix: 使用压缩算法1压缩索引效果较差
Merge pull request !1852 from 吴岳川/cherry-pick-1655432421
2022-06-21 03:08:28 +00:00
opengauss-bot f5b5da8c00
!1848 【3.0.0回合】1776 使用like including all/reloptoins时,即使包含compresstype,也会成功;compresstype可以与segment=off一起使用。
Merge pull request !1848 from 吴岳川/cherry-pick-1655432218
2022-06-21 03:08:28 +00:00
opengauss-bot 6736b6e2bf
!1851 【3.0.0回合】1793 stop standby repair
Merge pull request !1851 from 吴岳川/cherry-pick-1655432342
2022-06-21 03:08:23 +00:00
opengauss-bot d895a5767c
!1849 【3.0.0回合】1788 当values返回多条结果时,及时释放上一条结果的内存
Merge pull request !1849 from 吴岳川/cherry-pick-1655432284
2022-06-21 03:08:14 +00:00
opengauss-bot 4e60932817
!1847 【3.0.0回合】1750 数据备份时,页面校验增加非压缩页面校验。
Merge pull request !1847 from 吴岳川/cherry-pick-1655432153
2022-06-21 03:07:21 +00:00
opengauss-bot c63a880e8a
!1846 【3.0.0回合】1780 bugfix: 压缩表的mdtruncate无法实际应用到备机
Merge pull request !1846 from 吴岳川/cherry-pick-1655432084
2022-06-21 03:07:15 +00:00
opengauss-bot dc5fc6299d
!1845 【3.0.0回合】1740 compressByteConvert\compressDiffConvert内存判断当且仅当用户输入为true而不是判断用户是否使用该参数
Merge pull request !1845 from 吴岳川/cherry-pick-1655432002
2022-06-21 03:06:56 +00:00
opengauss-bot e1c5cb8c73
!1844 【3.0.0回合】1741 【压缩特性】在回放过程中,假设表文件已经被创建而表_pca等文件未被创建,flags会被修改,丢失O_CREATE标记,导致备机回放失败
Merge pull request !1844 from 吴岳川/cherry-pick-1655431921
2022-06-21 03:06:49 +00:00
opengauss-bot a1c81e7ce5
!1843 【3.0.0回合】1760 DFX: add exit log in PercentileMain
Merge pull request !1843 from 吴岳川/cherry-pick-1655431863
2022-06-21 03:06:41 +00:00
opengauss-bot 301ac8502e
!1855 【3.0.0回合】1791 修复pg_get_tabledef()导出自生成列定义的问题
Merge pull request !1855 from 仲夏十三/cherry-pick-1655434840
2022-06-21 03:06:21 +00:00
opengauss-bot cdd0841585
!1854 【3.0.0回合】1747 修复复合datum产生的record报错
Merge pull request !1854 from 仲夏十三/cherry-pick-1655434591
2022-06-21 03:05:56 +00:00
opengauss-bot d69e333d76
!1865 [bugfix] 回合主线修复的gsc pagewrite线程退出时的bug到3.0.0分支
Merge pull request !1865 from 周斌/merge_3.0.0
2022-06-21 03:05:11 +00:00
opengauss-bot dee07756d5
!1860 回合主线修复的bug到3.0.0分支
Merge pull request !1860 from 薛蒙恩/ps330bf
2022-06-21 03:05:06 +00:00
opengauss-bot 324994809b
!1866 [master分支同步] fix bug interval分区exchange失败
Merge pull request !1866 from cchen676/new3.0
2022-06-21 02:08:27 +00:00
opengauss-bot a5554872c0
!1858 【bugfix回合】修复hash_index回放时未判断返回值引发的core问题
Merge pull request !1858 from 陈栋/3.0.0
2022-06-21 02:07:33 +00:00
opengauss-bot 6d9302928f
!1868 【3.0.0回合】修复plpgsql在使用b_sql_plugin插件的情况下没有正确使用插件语法解析器的bug
Merge pull request !1868 from Cross-罗/cherry-pick-1655690635
2022-06-20 06:20:19 +00:00
opengauss-bot ae26a4b680
!1869 【3.0.0回合】修复并行查询limit 1性能劣化严重的问题
Merge pull request !1869 from Cross-罗/cherry-pick-1655696134
2022-06-20 06:07:29 +00:00
l00584793 f70512b3e1 fixed f9b0018 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/1833
smp bugfix
2022-06-20 03:35:34 +00:00
xue_meng_en 9fae85b375 修复wal2json插件编译时报logical.h文件中的DefElem类型未声明的错误 2022-06-20 11:02:59 +08:00
xue_meng_en 88a0533c0b 修复发布订阅死锁问题 2022-06-20 11:01:48 +08:00
l00584793 9dfce8735a fixed 7f9a1f5 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/1703
Fix the bug that the pgplsql invokes the syntax parser error.
2022-06-20 02:03:58 +00:00
opengauss-bot 6939022cdf
!1859 修复json_to_recordset函数未对输入做校验问题
Merge pull request !1859 from buter/3.0.0
2022-06-20 02:00:05 +00:00
opengauss-bot 6bc3fae656
!1857 修复SSL认证模式下中间人攻击的问题
Merge pull request !1857 from buter/3.0.0
2022-06-20 01:59:24 +00:00
opengauss-bot 17049c589d
!1863 修复array_set函数数组下界整数回绕问题
Merge pull request !1863 from buter/3.0.0
2022-06-20 01:58:38 +00:00
opengauss-bot f28c85bb15
!1864 gs_ctl添加-C参数适配流失容灾【回合3.0.0】
Merge pull request !1864 from zhangxubo/3.0.0
2022-06-20 01:55:53 +00:00
opengauss-bot e266ff1896
!1716 fix core of function pg_create_physical_replication_slot_extern
Merge pull request !1716 from 胡正超/repslot300
2022-06-20 01:50:11 +00:00
仲夏十三 9a1542b4ab Merge branch '3.0.0' of gitee.com:opengauss/openGauss-server into cherry-pick-1655434591 2022-06-20 01:34:25 +00:00
opengauss-bot c62aa81f3e
!1850 【3.0.0回合】join结果不正确bug
Merge pull request !1850 from Cross-罗/cherry-pick-1655432207
2022-06-17 09:57:37 +00:00
arcoalien@qq.com 998f4a0fa6 [回合主线]fix bug interval分区exchange失败 2022-06-17 17:25:51 +08:00
cyb 8bca669066 solve the switchover bugs caused by the wake_sub_threads 2022-06-17 15:44:12 +08:00
cyb ee791bd720 solve the switchover problem of pagewriter exiting 2022-06-17 15:37:17 +08:00
justbk 8a2b19a1cf repair gsc sub thread exit error issue 2022-06-17 15:36:37 +08:00
justbk 07d4a897dd repair wal_level=archive in switchover/failover get tuple concurrently updated issue 2022-06-17 15:36:07 +08:00
justbk b1377ef6a4 repair gs_gsc_memory_detail memory info inaccurate issue 2022-06-17 15:35:55 +08:00
justbk 5d64306497 repair GSC no cache issue 2022-06-17 15:35:13 +08:00
justbk 90433cd603 repair opengauss close failed issue 2022-06-17 15:34:43 +08:00
zhang_xubo b95ba5bc17 gs_ctl添加-C参数适配流失容灾 2022-06-17 15:13:46 +08:00
buter 8b7319f2cf 修复array_set函数数组下界整数回绕问题 2022-06-17 15:11:11 +08:00
buter 30971ad56e 修复array_set函数数组下界整数回绕问题 2022-06-17 11:36:48 +08:00
buter 56d56689dc 修复SSL认证模式下中间人攻击的问题 2022-06-17 11:32:56 +08:00
chendong76 1ce0d3bc9a 修复hash_index回放时未判断返回值引发的core问题 2022-06-17 11:32:24 +08:00
ganyang c86cd03855 fixed a53c9bb from https://gitee.com/kidhasdream/openGauss-server/pulls/1791
fix generated issue
2022-06-17 03:00:47 +00:00
ganyang 705a139012 fixed 1fd4bd2 from https://gitee.com/kidhasdream/openGauss-server/pulls/1791
fix create index info
2022-06-17 03:00:40 +00:00
ganyang a6ff7b5fff fixed f14255f from https://gitee.com/kidhasdream/openGauss-server/pulls/1747
fix record type issue caused by composite datum
2022-06-17 02:56:37 +00:00
ganyang 4b966bc1cb fixed 11a1a5c from https://gitee.com/kidhasdream/openGauss-server/pulls/1702
fix partition error
2022-06-17 02:53:21 +00:00
kidhasdream 40612feeac fixed 4898f04 from https://gitee.com/kidhasdream/openGauss-server/pulls/1702
change fastcheck
2022-06-17 02:53:06 +00:00
wuyuechuan fb013d16f6 fixed bf9d1b4 from https://gitee.com/wuyuechuan/openGauss-server/pulls/1782
bugfix: poor index compression ratio when use default pglz compression
2022-06-17 02:20:21 +00:00
wuyuechuan 5ee0248876 fixed c8d621d from https://gitee.com/wuyuechuan/openGauss-server/pulls/1793
stop standby repair
2022-06-17 02:19:02 +00:00
wuyuechuan b3e4d5a60d fixed 20ab9cd from https://gitee.com/wuyuechuan/openGauss-server/pulls/1788
bugfix: poor index compression ratio when use default pglz compression
2022-06-17 02:18:04 +00:00
wuyuechuan 43a3b0b2db fixed 8b6d9bd from https://gitee.com/wuyuechuan/openGauss-server/pulls/1776
1. (like...including reloptions) will success even if reloptions contains compresstype
2. compresstype can be used with (semgent=off) reloption
2022-06-17 02:16:59 +00:00
luozihao a493c304c4 fixed 4c0a495 from https://gitee.com/luo_zihao5524/openGauss-server/pulls/1710
fixed the bug of join
2022-06-17 02:16:49 +00:00
wuyuechuan 127a821823 fixed df87af4 from https://gitee.com/wuyuechuan/openGauss-server/pulls/1750
bugfix: backup failed when uncompressed page in compressed table
2022-06-17 02:15:53 +00:00
wuyuechuan 1e8931d6e4 fixed ef5c7af from https://gitee.com/wuyuechuan/openGauss-server/pulls/1780
bugfix: mdtruncate redo can not read compress_opt
2022-06-17 02:14:44 +00:00
wuyuechuan 6b5e8d599a fixed dbcf479 from https://gitee.com/wuyuechuan/openGauss-server/pulls/1740
set compressByteConvert/compressDiffConvert to true when defElem is set to true
2022-06-17 02:13:22 +00:00
wuyuechuan c17ac270e8 fixed 5af581f from https://gitee.com/wuyuechuan/openGauss-server/pulls/1741
use `RetryDataFileIdOpenFile` to prevent the flags from being modified
2022-06-17 02:12:02 +00:00
wuyuechuan 1e46d1b4ca fixed 82d5ac6 from https://gitee.com/wuyuechuan/openGauss-server/pulls/1760
DFX: add exit log in PercentileMain
2022-06-17 02:11:03 +00:00
TotaJ c85eab2542 fixed f719422 from https://gitee.com/totaj/openGauss-server/pulls/1700
Fix ustore bug in publication.
2022-06-17 01:44:03 +00:00
TotaJ 8fc10a08b1 fixed 62e3bed from https://gitee.com/totaj/openGauss-server/pulls/1772
Fix gs_dump
2022-06-17 01:43:25 +00:00
TotaJ 87ff1d3c76 fixed c1335be from https://gitee.com/totaj/openGauss-server/pulls/1726
Fix deserialize func and view.
2022-06-17 01:35:59 +00:00
TotaJ 6e6eb8708c fixed 38b5a0a from https://gitee.com/totaj/openGauss-server/pulls/1697
Fix logical decode core.
2022-06-17 01:32:28 +00:00
opengauss-bot f8003325cb
!1837 【bugfix】解决分区表autovacuum时已达到清理阈值但没有自动清理,2.0.0分支修复问题回合3.0.0
Merge pull request !1837 from li_jianqiu/cherry-pick-1655373819
2022-06-16 12:43:47 +00:00
li_jianqiu 707f627e9c fixed 3aea40d from https://gitee.com/li_jianqiu/openGauss-server/pulls/1836
【bugfix】解决分区表autovacuum时已达到清理阈值但没有自动清理
2022-06-16 10:03:40 +00:00
opengauss-bot 8793cac1c6
!1784 回退对3.0分支wm_concat 的支持
Merge pull request !1784 from 刘伟/rollback_wm_concat_change_for_3.0.0
2022-06-01 11:04:20 +00:00
wei.liu f1ab25ed55 rollback wm_concat change for orafce 2022-06-01 11:10:26 +08:00
opengauss-bot c6cf59f29f
!1669 add wm_concat function to use internal datatype
Merge pull request !1669 from 吕辉/wm_concat
2022-05-24 01:44:32 +00:00
gentle_hu 36e8a88c7a fix core of function pg_create_physical_replication_slot_extern 2022-05-07 14:52:03 +08:00
opengauss-bot a5410b7f86
!1667 修复enable_global_syscache关闭时连接B兼容性数据库的core问题
Merge pull request !1667 from chenxiaobin/3.0.0
2022-04-11 11:11:06 +00:00
lvhui c711c7dc5f add wm_concat in InternalAggIsSupported 2022-04-11 17:41:56 +08:00
chenxiaobin19 3bea35e8c1 修复enable_global_syscache关闭时连接B兼容性数据库的core问题 2022-04-08 11:11:57 +08:00
3496 changed files with 237455 additions and 466905 deletions

View File

@ -1,24 +1,23 @@
<!-- 感谢您提交Pull Reqeust -->
<!-- 提交说明: 请按照以下的模板提交PR下列内容均为必填项。如果未补充对应内容不允许提交PR。 -->
<!-- 提交说明: 请简单说明PR实现内容和修改逻辑 -->
<!-- 关联issue: 请添加上关联issue的链接如果没有关联issue请先创建issue -->
【标题】(请简要描述下实现的内容)
【实现内容】:
【根因分析】:
【实现方案】:
【修改方案】:
1. xxx
2. xxx
【关联需求或issue】:
【关联issue】:
【开发自验报告】:
1. 请附上自验结果(内容或者截图)
2. 是否可以添加fastcheck测试用例如是请补充fastcheck用例
3. 是否涉及资料修改如是在docs仓库补充资料
4. 是否考虑升级场景(系统表修改、日志持久化以及修改执行态数据格式)
5. 是否考虑在线扩容等扩展场景
4. 是否考虑支撑升级和在线扩容等扩展场景
5. 是否考虑异常场景/并发场景/前向兼容/性能场景
6. 是否对其他模块产生影响
【其他说明】:
6. 是否对其他模块产生影响

24
.gitmodules vendored
View File

@ -1,24 +0,0 @@
[submodule "openGauss-Custom-function"]
path = openGauss-Custom-function
url = ../openGauss-Custom-function.git
[submodule "openGauss-Query-select"]
path = openGauss-Query-select
url = ../openGauss-Query-select.git
[submodule "openGauss-Security-control"]
path = openGauss-Security-control
url = ../openGauss-Security-control.git
[submodule "openGauss-Stored-Procedure"]
path = openGauss-Stored-Procedure
url = ../openGauss-Stored-Procedure.git
[submodule "openGauss-basic-operation"]
path = openGauss-basic-operation
url = ../openGauss-basic-operation.git
[submodule "openGauss-transaction"]
path = openGauss-transaction
url = ../openGauss-transaction.git
[submodule "openGauss-trigger"]
path = openGauss-trigger
url = ../openGauss-trigger.git
[submodule "openGauss-competition"]
path = openGauss-competition
url = ../openGauss-competition.git

View File

@ -66,9 +66,9 @@ if("${GCC_VERSION}" STREQUAL "7.3.0")
set(GCC_VERSION_LIT 7.3)
endif()
execute_process(COMMAND uname -p OUTPUT_VARIABLE CURRENT_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
if("$ENV{BUILD_TUPLE}" STREQUAL "")
execute_process(COMMAND uname -p OUTPUT_VARIABLE CURRENT_TUPLE OUTPUT_STRIP_TRAILING_WHITESPACE)
set(BUILD_TUPLE ${CURRENT_TUPLE})
set(BUILD_TUPLE ${CURRENT_ARCH})
else()
set(BUILD_TUPLE $ENV{BUILD_TUPLE})
endif()

View File

@ -93,8 +93,6 @@ install:
$(MAKE) install_pldebugger
$(MAKE) -C contrib/postgres_fdw $@
$(MAKE) -C contrib/hstore $@
$(MAKE) -C contrib/dblink $@
@if test -d contrib/dolphin; then $(MAKE) -C contrib/dolphin $@; fi
+@echo "openGauss installation complete."
endif
endif

View File

@ -1,3 +1,4 @@
木兰宽松许可证, 第2版
木兰宽松许可证, 第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2

1229
README.md

File diff suppressed because it is too large Load Diff

View File

@ -90,5 +90,6 @@ then
else
./package_opengauss.sh -3rd ${build_binarylib_dir} -m ${build_version_mode} -f ${config_file}
fi
fi
exit 0

View File

@ -43,6 +43,9 @@
./share/postgresql/extension/hstore--1.0--1.1.sql
./share/postgresql/extension/log_fdw--1.0.sql
./share/postgresql/extension/log_fdw.control
./share/postgresql/extension/packages--1.0.sql
./share/postgresql/extension/packages--1.0--1.1.sql
./share/postgresql/extension/packages.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -614,6 +617,23 @@
./share/postgresql/timezone/Asia/Yakutsk
./share/postgresql/timezone/Asia/Magadan
./share/postgresql/timezone/Asia/Amman
./share/postgresql/timezone/Asia/Barnaul
./share/postgresql/timezone/Asia/Chita
./share/postgresql/timezone/Asia/Tomsk
./share/postgresql/timezone/Asia/Atyrau
./share/postgresql/timezone/Asia/Famagusta
./share/postgresql/timezone/Asia/Qostanay
./share/postgresql/timezone/Asia/Srednekolymsk
./share/postgresql/timezone/Asia/Yangon
./share/postgresql/timezone/Pacific/Bougainville
./share/postgresql/timezone/Antarctica/Troll
./share/postgresql/timezone/Europe/Astrakhan
./share/postgresql/timezone/Europe/Ulyanovsk
./share/postgresql/timezone/Europe/Kirov
./share/postgresql/timezone/Europe/Saratov
./share/postgresql/timezone/America/Fort_Nelson
./share/postgresql/timezone/America/Nuuk
./share/postgresql/timezone/America/Punta_Arenas
./share/postgresql/timezone/Asia/Kuching
./share/postgresql/timezone/Asia/Novosibirsk
./share/postgresql/timezone/Asia/Seoul
@ -670,25 +690,43 @@
./share/postgresql/timezonesets/Etc.txt
./share/postgresql/postgres.bki
./share/sslcert/gsql/openssl.cnf
./lib/libnuma.so*
./lib/libnuma.so
./lib/libnuma.so.1
./lib/libnuma.so.1.0.0
./lib/libpq.so
./lib/libpq.so.5
./lib/libpq.so.5.5
./lib/libssl.so*
./lib/libcrypto.so*
./lib/libcgroup.so*
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libcgroup.so
./lib/libcgroup.so.1
./lib/libz.so*
./lib/liblz4.so*
./lib/libcjson.so*
./lib/libcjson_utils.so*
./lib/liblz4.so
./lib/liblz4.so.1
./lib/liblz4.so.1.9.3
./lib/libcjson.so
./lib/libcjson.so.1
./lib/libcjson.so.1.7.15
./lib/libcjson_utils.so
./lib/libcjson_utils.so.1
./lib/libcjson_utils.so.1.7.15
./lib/libstdc++.so.6
./lib/libgcc_s.so.1
./lib/libgomp.so*
./lib/libgomp.so
./lib/libgomp.so.1
./lib/libgomp.so.1.0.0
./lib/libdcf.so
./lib/libzstd.so*
./lib/libcurl.so*
./lib/libzstd.so
./lib/libzstd.so.1
./lib/libzstd.so.1.5.0
./lib/libcurl.so
./lib/libcurl.so.4
./lib/libcurl.so.4.7.0
./lib/libxgboost.so
./lib/libpagecompression.so*
./lib/libpagecompression.so
./lib/libpagecompression.so.1
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/postgresql/euc_kr_and_mic.so
@ -727,7 +765,6 @@
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/postgresql/pgoutput.so
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h
./include/postgresql/server/pgtime.h
@ -882,13 +919,14 @@
./include/postgresql/server/lib/ilist.h
./include/postgresql/server/pgxc/locator.h
./include/postgresql/server/gstrace/gstrace_infra.h
./include/postgresql/server/db4ai/db4ai.h
[libpq]
./lib/libpq.so
./lib/libpq.so.5
./lib/libpq.so.5.5
./lib/libcrypto.so*
./lib/libssl.so*
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libssl.so
./lib/libssl.so.1.1
[header]
./include/libpq/libpq-fs.h
./include/libpq-fe.h
@ -904,4 +942,4 @@
./include/pqcomm.h
./include/pqexpbuffer.h
[version]
5.0.0
3.0.3

View File

@ -1,10 +1,4 @@
[server]
./bin/dsscmd
./bin/dssserver
./bin/perctrl
./bin/dms_contrl.sh
./bin/dss_clear.sh
./bin/dss_contrl.sh
./bin/gsql
./bin/gaussdb
./bin/gstrace
@ -40,8 +34,8 @@
./bin/kadmin.local
./bin/lz4
./bin/kadmind
./bin/dbmind
./bin/gs_dbmind
./bin/constant
./bin/server.key.cipher
./bin/server.key.rand
./bin/gs_plan_simulator.sh
@ -66,8 +60,6 @@
./share/postgresql/extension/hstore.control
./share/postgresql/extension/security_plugin.control
./share/postgresql/extension/security_plugin--1.0.sql
./share/postgresql/extension/dolphin.control
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control
./share/postgresql/extension/dist_fdw.control
@ -83,9 +75,6 @@
./share/postgresql/extension/mot_fdw.control
./share/postgresql/extension/postgres_fdw--1.0.sql
./share/postgresql/extension/postgres_fdw.control
./share/postgresql/extension/dblink--1.0.sql
./share/postgresql/extension/dblink--unpackaged--1.0.sql
./share/postgresql/extension/dblink.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -658,6 +647,23 @@
./share/postgresql/timezone/Asia/Yakutsk
./share/postgresql/timezone/Asia/Magadan
./share/postgresql/timezone/Asia/Amman
./share/postgresql/timezone/Asia/Barnaul
./share/postgresql/timezone/Asia/Chita
./share/postgresql/timezone/Asia/Tomsk
./share/postgresql/timezone/Asia/Atyrau
./share/postgresql/timezone/Asia/Famagusta
./share/postgresql/timezone/Asia/Qostanay
./share/postgresql/timezone/Asia/Srednekolymsk
./share/postgresql/timezone/Asia/Yangon
./share/postgresql/timezone/Pacific/Bougainville
./share/postgresql/timezone/Antarctica/Troll
./share/postgresql/timezone/Europe/Astrakhan
./share/postgresql/timezone/Europe/Ulyanovsk
./share/postgresql/timezone/Europe/Kirov
./share/postgresql/timezone/Europe/Saratov
./share/postgresql/timezone/America/Fort_Nelson
./share/postgresql/timezone/America/Nuuk
./share/postgresql/timezone/America/Punta_Arenas
./share/postgresql/timezone/Asia/Kuching
./share/postgresql/timezone/Asia/Novosibirsk
./share/postgresql/timezone/Asia/Seoul
@ -756,11 +762,9 @@
./lib/postgresql/pg_plugin
./lib/postgresql/proc_srclib
./lib/postgresql/security_plugin.so
./lib/postgresql/dolphin.so
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/java/pljava.jar
./lib/postgresql/postgres_fdw.so
./lib/postgresql/dblink.so
./lib/postgresql/pgoutput.so
./lib/libpljava.so
./lib/libpq.a
@ -774,11 +778,18 @@
./lib/libnuma.so
./lib/libnuma.so.1
./lib/libnuma.so.1.0.0
./lib/libcgroup.so*
./lib/libcom_err_gauss.so*
./lib/libatomic.so*
./lib/libcgroup.so
./lib/libcgroup.so.1
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
./lib/libatomic.so
./lib/libatomic.so.1
./lib/libatomic.so.1.2.0
./lib/libmasstree.so
./lib/libupb.so*
./lib/libupb.so
./lib/libupb.so.9
./lib/libupb.so.9.0.0
./lib/libabsl_str_format_internal.so
./lib/libabsl_strings.so
./lib/libabsl_throw_delegate.so
@ -792,28 +803,59 @@
./lib/libabsl_log_severity.so
./lib/libaddress_sorting.so
./lib/libaddress_sorting.so.9
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkadm5clnt.so
./lib/libkadm5clnt_mit.so*
./lib/libkadm5clnt_mit.so
./lib/libkadm5clnt_mit.so.11
./lib/libkadm5clnt_mit.so.11.0
./lib/libkadm5clnt_mit.so.12
./lib/libkadm5clnt_mit.so.12.0
./lib/libkadm5srv.so
./lib/libkadm5srv_mit.so*
./lib/libkdb5.so*
./lib/libkrad.so*
./lib/libkrb5_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkadm5srv_mit.so
./lib/libkadm5srv_mit.so.11
./lib/libkadm5srv_mit.so.11.0
./lib/libkadm5srv_mit.so.12
./lib/libkadm5srv_mit.so.12.0
./lib/libkdb5.so
./lib/libkdb5.so.9
./lib/libkdb5.so.9.0
./lib/libkdb5.so.10
./lib/libkdb5.so.10.0
./lib/libkrad.so
./lib/libkrad.so.0
./lib/libkrad.so.0.0
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/krb5/plugins/kdb/db2.so
./lib/libverto.so*
./lib/libverto.so
./lib/libverto.so.0
./lib/libverto.so.0.0
./lib/libcurl.so*
./lib/libcrypto.so*
./lib/libssl.so*
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libgcc_s.so.1
./lib/libstdc++.so.6
./lib/libz.so*
./lib/liblz4.so*
./lib/liblz4.so
./lib/liblz4.so.1
./lib/liblz4.so.1.9.3
./lib/libcjson.so*
./lib/libconfig.so*
./lib/libconfig.so
./lib/libconfig.so.4
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./share/llvmir/GaussDB_expr.ir
@ -830,12 +872,12 @@
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/libdcf.so
./lib/libzstd.so*
./lib/libzstd.so
./lib/libzstd.so.1
./lib/libzstd.so.1.5.0
./lib/libxgboost.so
./lib/libpagecompression.so*
./lib/libdssapi.so
./lib/libdms.so
./lib/libodbc.so*
./lib/libpagecompression.so
./lib/libpagecompression.so.1
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h
@ -1019,7 +1061,6 @@
./include/postgresql/server/knl/knl_guc/knl_instance_attr_resource.h
./include/postgresql/server/knl/knl_guc/knl_session_attr_common.h
./include/postgresql/server/knl/knl_guc/knl_instance_attr_common.h
./include/postgresql/server/access/ustore/knl_uverify.h
./include/postgresql/server/lib/circularqueue.h
./include/postgresql/server/access/double_write_basic.h
./include/postgresql/server/knl/knl_thread.h
@ -1129,9 +1170,6 @@
./include/postgresql/server/catalog/namespace.h
./include/postgresql/server/commands/trigger.h
./include/postgresql/server/executor/spi.h
./include/postgresql/server/db4ai/db4ai.h
./include/postgresql/server/instruments/gs_stack.h
./include/postgresql/server/instruments/instr_mfchain.h
./include/postgresql/server/access/ustore/undo/knl_uundotype.h
./include/postgresql/server/access/ustore/undo/knl_uundoapi.h
./include/postgresql/server/access/ustore/knl_uheap.h
@ -1151,44 +1189,6 @@
./include/postgresql/server/executor/exec/execdesc.h
./include/postgresql/server/db4ai/matrix.h
./include/postgresql/server/db4ai/scores.h
./include/postgresql/server/access/multixact.h
./include/postgresql/server/access/xlogutils.h
./include/postgresql/server/executor/functions.h
./include/postgresql/server/storage/lock/waitpolicy.h
./include/postgresql/server/storage/page_compression.h
./include/postgresql/server/storage/smgr/knl_usync.h
./include/postgresql/server/storage/smgr/fd.h
./include/postgresql/server/storage/smgr/smgr.h
./include/postgresql/server/storage/sharedfileset.h
./include/postgresql/server/utils/knl_globalsysdbcache.h
./include/postgresql/server/utils/knl_globaldbstatmanager.h
./include/postgresql/server/utils/knl_globalsyscache_common.h
./include/postgresql/server/utils/knl_globalbucketlist.h
./include/postgresql/server/utils/knl_globalsystabcache.h
./include/postgresql/server/utils/knl_globalsystupcache.h
./include/postgresql/server/utils/knl_globaltabdefcache.h
./include/postgresql/server/utils/knl_globalbasedefcache.h
./include/postgresql/server/utils/knl_globalpartdefcache.h
./include/postgresql/server/utils/knl_globalrelmapcache.h
./include/postgresql/server/utils/knl_localsysdbcache.h
./include/postgresql/server/utils/knl_localsystabcache.h
./include/postgresql/server/utils/knl_localsystupcache.h
./include/postgresql/server/utils/knl_localsyscache_common.h
./include/postgresql/server/utils/knl_localtabdefcache.h
./include/postgresql/server/utils/knl_localbasedefcache.h
./include/postgresql/server/utils/knl_localbucketlist.h
./include/postgresql/server/utils/knl_localpartdefcache.h
./include/postgresql/server/utils/pl_global_package_runtime_cache.h
./include/postgresql/server/catalog/pg_tablespace.h
./include/postgresql/server/catalog/pg_subscription.h
./include/postgresql/server/catalog/pg_replication_origin.h
./include/postgresql/server/postmaster/barrier_creator.h
./include/postgresql/server/postmaster/pagerepair.h
./include/postgresql/server/replication/libpqwalreceiver.h
./include/postgresql/server/replication/worker_internal.h
./include/postgresql/server/replication/origin.h
./include/postgresql/server/parser/scanner.h
./include/postgresql/server/parser/keywords.h
./jre/ASSEMBLY_EXCEPTION
./jre/bin/java
./jre/bin/jjs
@ -1374,41 +1374,57 @@
./lib/libpq_ce.so.5
./lib/libpq_ce.so.5.5
./lib/libgauss_cl_jni.so
./lib/libconfig.so*
./lib/libcrypto.so*
./lib/libconfig.so
./lib/libconfig.so.4
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libstdc++.so.6
./lib/libssl.so*
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkrb5_gauss.so*
./lib/libcom_err_gauss.so*
./lib/libcjson.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
[libpq]
./lib/libpq.a
./lib/libpq.so
./lib/libpq.so.5
./lib/libpq.so.5.5
./lib/libpq_ce.so
./lib/libpq_ce.so.5
./lib/libpq_ce.so.5.5
./lib/libgauss_cl_jni.so
./lib/libconfig.so*
./lib/libcrypto.so*
./lib/libstdc++.so.6
./lib/libssl.so*
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkrb5_gauss.so*
./lib/libcom_err_gauss.so*
./lib/libcjson.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
./include/gs_thread.h
./include/gs_threadlocal.h
./include/postgres_ext.h

View File

@ -1,9 +1,16 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2020-2021, Huawei Tech. Co., Ltd.
# descript: Compile opengauss
# Return 0 means OK.
# Return 1 means failed.
# version: 1.0
# date: 2020-11-28
#######################################################################
# It is just a wrapper to package_internal.sh
# Example: ./build_opengauss.sh -3rd path/third_party_binarylibs/
# Example: ./build_opengauss.sh -3rd /path/to/your/third_party_binarylibs/
# change it to "N", if you want to build with original build system based on solely Makefiles
declare CMAKE_PKG="N"
declare SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}"); pwd)
@ -162,4 +169,4 @@ function main()
}
main
echo "now, all build has finished!"
exit 0
exit 0

View File

@ -442,7 +442,6 @@ function install_gaussdb()
export BUILD_TUPLE=${PLATFORM_ARCH}
export THIRD_BIN_PATH="${binarylibs_path}"
export PREFIX_HOME="${BUILD_DIR}"
export ENABLE_LITE_MODE=ON
if [ "$version_mode"x == "release"x ]; then
CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON"
@ -455,10 +454,6 @@ function install_gaussdb()
export DEBUG_TYPE=debug
fi
if [[ -e "/etc/openEuler-release" && "$(cat /etc/openEuler-release | awk '{print $3}')" == "22.03" ]]; then
CMAKE_OPT="$CMAKE_OPT -DENABLE_OPENEULER_MAJOR=ON"
fi
echo "CMAKE_OPT----> $CMAKE_OPT"
echo "Begin run cmake for gaussdb server" >> "$LOG_FILE" 2>&1
echo "CMake options: ${CMAKE_OPT}" >> "$LOG_FILE" 2>&1
echo "CMake release: ${DEBUG_TYPE}" >> "$LOG_FILE" 2>&1

View File

@ -1,2 +1,2 @@
PRODUCT=openGauss
VERSION=5.0.0
VERSION=3.0.3

View File

@ -38,6 +38,7 @@
./bin/kadmin.local
./bin/lz4
./bin/kadmind
./bin/dbmind
./bin/server.key.cipher
./bin/server.key.rand
./etc/kerberos/kadm5.acl
@ -79,9 +80,6 @@
./share/postgresql/extension/gsredistribute--unpackaged--1.0.sql
./share/postgresql/extension/postgres_fdw--1.0.sql
./share/postgresql/extension/postgres_fdw.control
./share/postgresql/extension/dblink--1.0.sql
./share/postgresql/extension/dblink--unpackaged--1.0.sql
./share/postgresql/extension/dblink.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -755,7 +753,6 @@
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/java/pljava.jar
./lib/postgresql/postgres_fdw.so
./lib/postgresql/dblink.so
./lib/libpljava.so
./lib/libpq.a
./lib/libpq.so
@ -884,7 +881,6 @@
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/libhll.so
./lib/libodbc.so*
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h

View File

@ -37,7 +37,7 @@
./bin/kadmin.local
./bin/lz4
./bin/kadmind
./bin/gs_dbmind
./bin/dbmind
./bin/server.key.cipher
./bin/server.key.rand
./bin/gs_plan_simulator.sh
@ -60,8 +60,6 @@
./share/postgresql/extension/hstore.control
./share/postgresql/extension/security_plugin.control
./share/postgresql/extension/security_plugin--1.0.sql
./share/postgresql/extension/dolphin.control
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control
./share/postgresql/extension/dist_fdw.control
@ -82,9 +80,6 @@
./share/postgresql/extension/gsredistribute--unpackaged--1.0.sql
./share/postgresql/extension/postgres_fdw--1.0.sql
./share/postgresql/extension/postgres_fdw.control
./share/postgresql/extension/dblink--1.0.sql
./share/postgresql/extension/dblink--unpackaged--1.0.sql
./share/postgresql/extension/dblink.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -754,11 +749,9 @@
./lib/postgresql/pg_plugin
./lib/postgresql/proc_srclib
./lib/postgresql/security_plugin.so
./lib/postgresql/dolphin.so
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/java/pljava.jar
./lib/postgresql/postgres_fdw.so
./lib/postgresql/dblink.so
./lib/libpljava.so
./lib/libpq.a
./lib/libpq.so
@ -887,7 +880,6 @@
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/libhll.so
./lib/libodbc.so*
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h
@ -1053,54 +1045,12 @@
./include/postgresql/server/access/ustore/undo/knl_uundotxn.h
./include/postgresql/server/access/ustore/undo/knl_uundozone.h
./include/postgresql/server/access/ustore/undo/knl_uundospace.h
./include/postgresql/server/access/ustore/knl_uverify.h
./include/postgresql/server/communication/commproxy_basic.h
./include/postgresql/server/access/parallel_recovery/page_redo.h
./include/postgresql/server/access/parallel_recovery/spsc_blocking_queue.h
./include/postgresql/server/executor/exec/execdesc.h
./include/postgresql/server/db4ai/matrix.h
./include/postgresql/server/db4ai/scores.h
./include/postgresql/server/db4ai/db4ai.h
./include/postgresql/server/instruments/gs_stack.h
./include/postgresql/server/instruments/instr_mfchain.h
./include/postgresql/server/access/multixact.h
./include/postgresql/server/access/xlogutils.h
./include/postgresql/server/executor/functions.h
./include/postgresql/server/storage/lock/waitpolicy.h
./include/postgresql/server/storage/page_compression.h
./include/postgresql/server/storage/smgr/knl_usync.h
./include/postgresql/server/storage/smgr/fd.h
./include/postgresql/server/storage/smgr/smgr.h
./include/postgresql/server/storage/sharedfileset.h
./include/postgresql/server/utils/knl_globalsysdbcache.h
./include/postgresql/server/utils/knl_globaldbstatmanager.h
./include/postgresql/server/utils/knl_globalsyscache_common.h
./include/postgresql/server/utils/knl_globalbucketlist.h
./include/postgresql/server/utils/knl_globalsystabcache.h
./include/postgresql/server/utils/knl_globalsystupcache.h
./include/postgresql/server/utils/knl_globaltabdefcache.h
./include/postgresql/server/utils/knl_globalbasedefcache.h
./include/postgresql/server/utils/knl_globalpartdefcache.h
./include/postgresql/server/utils/knl_globalrelmapcache.h
./include/postgresql/server/utils/knl_localsysdbcache.h
./include/postgresql/server/utils/knl_localsystabcache.h
./include/postgresql/server/utils/knl_localsystupcache.h
./include/postgresql/server/utils/knl_localsyscache_common.h
./include/postgresql/server/utils/knl_localtabdefcache.h
./include/postgresql/server/utils/knl_localbasedefcache.h
./include/postgresql/server/utils/knl_localbucketlist.h
./include/postgresql/server/utils/knl_localpartdefcache.h
./include/postgresql/server/utils/pl_global_package_runtime_cache.h
./include/postgresql/server/catalog/pg_tablespace.h
./include/postgresql/server/catalog/pg_subscription.h
./include/postgresql/server/catalog/pg_replication_origin.h
./include/postgresql/server/postmaster/barrier_creator.h
./include/postgresql/server/postmaster/pagerepair.h
./include/postgresql/server/replication/libpqwalreceiver.h
./include/postgresql/server/replication/worker_internal.h
./include/postgresql/server/replication/origin.h
./include/postgresql/server/parser/scanner.h
./include/postgresql/server/parser/keywords.h
./jre/ASSEMBLY_EXCEPTION
./jre/bin/java
./jre/bin/jjs

View File

@ -1,6 +1,12 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2012-2019, Huawei Tech. Co., Ltd.
# descript: Separate debug information
# Return 0 means OK.
# Return 1 means failed.
# version: 2.0
# date: 2019-1-6
#######################################################################
DEPTH=$(pwd)
INSTALL_DIR=$DEPTH/../../mppdb_temp_install

View File

@ -1,6 +1,12 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2020-2021, Huawei Tech. Co., Ltd.
# descript: Compile and pack openGauss
# Return 0 means OK.
# Return 1 means failed.
# version: 2.0
# date: 2020-08-08
#######################################################################
#######################################################################
## Check the installation package production environment
#######################################################################
@ -21,7 +27,7 @@ function gaussdb_pkg_pre_clean()
function read_gaussdb_version()
{
cd ${SCRIPT_DIR}
echo "${product_name}-${version_number}" > version.cfg
echo "${gaussdb_name_for_package}-${version_number}" > version.cfg
#auto read the number from kernal globals.cpp, no need to change it here
}
@ -58,7 +64,7 @@ function get_kernel_commitid()
{
export PATH=${BUILD_DIR}:$PATH
export LD_LIBRARY_PATH=$GAUSSHOME/lib:$LD_LIBRARY_PATH
commitid=$(LD_PRELOAD='' ${BUILD_DIR}/bin/gaussdb -V | awk '{print $5}' | cut -d ")" -f 1)
commitid=$(LD_PRELOAD='' ${BUILD_DIR}/bin/gaussdb -V | awk '{print $5}' | cut -d ")" -f 1)
echo "${commitid}" >>${SCRIPT_DIR}/version.cfg
echo "End insert commitid into version.cfg" >> "$LOG_FILE" 2>&1
}

View File

@ -1,9 +1,15 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2020-2025, Huawei Tech. Co., Ltd.
# descript: Compile and pack openGauss
# Return 0 means OK.
# Return 1 means failed.
# version: 2.0
# date: 2020-08-08
#######################################################################
declare LOG_FILE="${SCRIPT_DIR}/makemppdb_pkg.log"
declare product_name='openGauss'
declare gaussdb_version='openGauss'
declare PLATFORM_ARCH=$(uname -p)
declare package_path=${ROOT_DIR}/output
declare install_package_format="tar"
@ -38,14 +44,17 @@ function die()
{
log "$@"
echo "$@"
exit $ERR_FAILED
exit $ERR_MKGS_FAILED
}
#######################################################################
##select package command accroding to install_package_format
#######################################################################
function select_package_command()
{
case "$install_package_format" in
tar)
tar='tar'
@ -56,34 +65,54 @@ function select_package_command()
}
select_package_command
#######################################################################
##get os dist version
#######################################################################
if [[ -f "/etc/openEuler-release" ]]; then
os_name="openEuler"
elif [[ -f "/etc/euleros-release" ]]; then
os_name="EulerOS"
export PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh")
if [ "${PLAT_FORM_STR}"x == "Failed"x -o "${PLAT_FORM_STR}"x == ""x ]
then
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64), Asianux platform."
exit 1;
fi
if [[ -f "/etc/euleros-release" ]]; then
dist_version="EulerOS"
if [ "$PLATFORM_ARCH"X == "aarch64"X ];then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
fi
elif [[ -f "/etc/centos-release" ]]; then
os_name="CentOS"
dist_version="CentOS"
if [ "$PLATFORM_ARCH"X == "aarch64"X ];then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
fi
elif [[ -f "/etc/openEuler-release" ]]; then
os_name="openEuler"
elif [[ -f "/etc/FusionOS-release" ]]; then
os_name="FusionOS"
dist_version="openEuler"
if [ "$PLATFORM_ARCH"X == "aarch64"X ];then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA -D__ARM_LSE"
fi
elif [[ -f "/etc/kylin-release" ]]; then
os_name="Kylin"
elif [[ -f "/etc/asianux-release" ]]; then
os_name="Asianux"
dist_version="Kylin"
if [ "$PLATFORM_ARCH"X == "aarch64"X ];then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
fi
elif [[ "$PLAT_FORM_STR" =~ "asianux" ]]; then
dist_version="Asianux"
if [ "$PLATFORM_ARCH"X == "aarch64"X ];then
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
fi
else
os_name=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z | sed 's/.*/\L&/; s/[a-z]*/\u&/g')
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS, Kylin(aarch64), Asianux platform."
echo "Kernel is $kernel"
exit 1
fi
##add platform architecture information
if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then
if [ "$os_name" != "openEuler" ] && [ "$os_name" != "EulerOS" ] && [ "$os_name" != "FusionOS" ] && [ "$os_name" != "Kylin" ] && [ "$dist_version" != "Asianux" ]; then
echo "We only support NUMA on openEuler(aarch64), EulerOS(aarch64), FusionOS(aarch64), Kylin(aarch64), Asianux platform."
if [ "$dist_version" != "openEuler" ] && [ "$dist_version" != "EulerOS" ] && [ "$dist_version" != "Kylin" ] && [ "$dist_version" != "Asianux" ]; then
echo "We only support NUMA on openEuler(aarch64), EulerOS(aarch64), Kylin(aarch64), Asianux platform."
exit 1
fi
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA"
fi
if [ "${binarylib_dir}" != 'None' ] && [ -d "${binarylib_dir}" ]; then
@ -94,6 +123,16 @@ else
die "${binarylib_dir} doesn't exist."
fi
# 小型化
declare lite_dist_version=${dist_version}
if [ "${lite_dist_version}" == "openEuler" ]; then
lite_dist_version="OPENEULER"
elif [ "${lite_dist_version}" == "Kylin" ]; then
lite_dist_version="LYLIN"
elif [ "${lite_dist_version}" == "EulerOS" ]; then
lite_dist_version="EULER"
fi
declare INSTALL_TOOLS_DIR=${binarylib_dir}/install_tools
declare UNIX_ODBC="${BINARYLIBS_PATH}/unixodbc"
@ -106,8 +145,9 @@ export LD_LIBRARY_PATH=$BUILD_TOOLS_PATH/gcc$gcc_version/gcc/lib64:$BUILD_TOOLS_
export PATH=$BUILD_TOOLS_PATH/gcc$gcc_version/gcc/bin:$PATH
export JAVA_HOME=${PLATFORM_PATH}/huaweijdk8/${PLATFORM_ARCH}/jdk
declare ERR_FAILED=1
declare ERR_OK=0
declare ERR_MKGS_FAILED=1
declare MKGS_OK=0
gaussdb_200_file="${BUILD_TOOLS_PATH}/license_control/gaussdb.version.GaussDB200"
gaussdb_300_file="${BUILD_TOOLS_PATH}/license_control/gaussdb.version.GaussDB300"
@ -127,10 +167,16 @@ declare release_file_list="${PLATFORM_ARCH}_${product_mode}_list"
#######################################################################
## declare all package name
#######################################################################
declare version_string="${product_name}-${version_number}"
declare package_pre_name="${version_string}-${os_name}-${PLATFORM}bit"
declare gaussdb_name_for_package="$(echo ${gaussdb_version} | sed 's/ /-/g')"
declare version_string="${gaussdb_name_for_package}-${version_number}"
declare package_pre_name="${version_string}-${dist_version}-${PLATFORM}bit"
declare libpq_package_name="${package_pre_name}-Libpq.tar.gz"
declare tools_package_name="${package_pre_name}-tools.tar.gz"
declare kernel_package_name="${package_pre_name}.tar.bz2"
declare symbol_package_name="${package_pre_name}-symbol.tar.gz"
declare sha256_name="${package_pre_name}.sha256"
declare sha256_name="${lite_package_pre_name}.sha256"
declare lite_package_pre_name="GaussDB-Kernel-V500R002C10-${lite_dist_version}-${PLATFORM}bit"
declare lite_kernel_package_name="${lite_package_pre_name}.bin"
declare lite_libpq_package_name="${lite_package_pre_name}-Libpq.tar.gz"
declare lite_symbol_package_name="${lite_package_pre_name}-symbol.tar.gz"
declare lite_sha256_name="${lite_package_pre_name}.sha256"

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#############################################################################
# Copyright (c) 2020 Huawei Technologies Co.,Ltd.
#
# openGauss is licensed under Mulan PSL v2.
# You can use this software according to the terms
@ -14,6 +15,7 @@
# See the Mulan PSL v2 for more details.
# ----------------------------------------------------------------------------
# Description : gs_backup is a utility to back up or restore binary files and parameter files.
#############################################################################
declare UPGRADE_SQL_DIR="${ROOT_DIR}/src/include/catalog/upgrade_sql"

View File

@ -1,6 +1,12 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2020-2021, Huawei Tech. Co., Ltd.
# descript: package opengauss lite
# Return 0 means OK.
# Return 1 means failed.
# version: 1.0
# date: 2022-04-10
#######################################################################
declare UPGRADE_SQL_DIR="${ROOT_DIR}/src/include/catalog/upgrade_sql"
@ -39,24 +45,24 @@ function target_file_copy()
sed -i '/^process_cpu_affinity|/d' $2/bin/cluster_guc.conf
#generate tar file
echo "Begin generate ${kernel_package_name} tar file..." >> "$LOG_FILE" 2>&1
echo "Begin generate ${lite_kernel_package_name} tar file..." >> "$LOG_FILE" 2>&1
cd $2
${BUILD_TOOLS_PATH}/p7z/bin/7z a -t7z -sfx "${kernel_package_name}" ./* >> "$LOG_FILE" 2>&1
${BUILD_TOOLS_PATH}/p7z/bin/7z a -t7z -sfx "${lite_kernel_package_name}" ./* >> "$LOG_FILE" 2>&1
cd '-'
mv $2/"${kernel_package_name}" ./
mv $2/"${lite_kernel_package_name}" ./
if [ $? -ne 0 ]; then
die "generate ${kernel_package_name} failed."
die "generate ${lite_kernel_package_name} failed."
fi
echo "End generate ${kernel_package_name} tar file" >> "$LOG_FILE" 2>&1
echo "End generate ${lite_kernel_package_name} tar file" >> "$LOG_FILE" 2>&1
#generate sha256 file
sha256_name="${sha256_name}"
echo "Begin generate ${sha256_name} sha256 file..." >> "$LOG_FILE" 2>&1
sha256sum "${kernel_package_name}" | awk -F" " '{print $1}' > "${sha256_name}"
sha256_name="${lite_sha256_name}"
echo "Begin generate ${lite_sha256_name} sha256 file..." >> "$LOG_FILE" 2>&1
sha256sum "${lite_kernel_package_name}" | awk -F" " '{print $1}' > "${lite_sha256_name}"
if [ $? -ne 0 ]; then
die "generate sha256 file failed."
fi
echo "End generate ${sha256_name} sha256 file" >> "$LOG_FILE" 2>&1
echo "End generate ${lite_sha256_name} sha256 file" >> "$LOG_FILE" 2>&1
if [ -d "${2}" ]; then
rm -rf ${2}
fi
@ -101,8 +107,8 @@ function separate_symbol()
chmod +x ./separate_debug_information.sh
./separate_debug_information.sh
cd $SCRIPT_DIR
mv symbols.tar.gz $symbol_package_name
deploy_pkgs $symbol_package_name
mv symbols.tar.gz $lite_symbol_package_name
deploy_pkgs $lite_symbol_package_name
fi
}
@ -142,10 +148,10 @@ function make_package_srv()
mkdir -p ${BUILD_DIR}/temp/dependency
cp ${BUILD_DIR}/lib/libstdc++.so.6 ${BUILD_DIR}/temp/dependency
cd ${BUILD_DIR}/temp
cp ${BUILD_DIR}/"${kernel_package_name}" ./
cp ${BUILD_DIR}/"${sha256_name}" ./
tar -czf "${package_pre_name}.tar.gz" ./*
deploy_pkgs "${package_pre_name}.tar.gz"
cp ${BUILD_DIR}/"${lite_kernel_package_name}" ./
cp ${BUILD_DIR}/"${lite_sha256_name}" ./
tar -czf "${lite_package_pre_name}.tar.gz" ./*
deploy_pkgs "${lite_package_pre_name}.tar.gz"
echo "make server(all) package success!"
}
@ -197,13 +203,13 @@ function make_package_libpq()
cd ${BUILD_DIR}/temp
echo "packaging libpq..."
tar -zvcf "${libpq_package_name}" ./* >>"$LOG_FILE" 2>&1
tar -zvcf "${lite_libpq_package_name}" ./* >>"$LOG_FILE" 2>&1
if [ $? -ne 0 ]; then
die "$package_command ${libpq_package_name} failed"
die "$package_command ${lite_libpq_package_name} failed"
fi
deploy_pkgs ${libpq_package_name}
echo "install $pkgname tools is ${libpq_package_name} of ${package_path} directory " >> "$LOG_FILE" 2>&1
deploy_pkgs ${lite_libpq_package_name}
echo "install $pkgname tools is ${lite_libpq_package_name} of ${package_path} directory " >> "$LOG_FILE" 2>&1
echo "success!"
}

View File

@ -1,6 +1,12 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2025. All rights reserved.
#######################################################################
# Copyright (c): 2020-2025, Huawei Tech. Co., Ltd.
# descript: Compile and pack openGauss
# Return 0 means OK.
# Return 1 means failed.
# version: 2.0
# date: 2020-08-08
#######################################################################
#######################################################################
## Check the installation package production environment
#######################################################################
@ -21,14 +27,16 @@ function gaussdb_pkg_pre_clean()
function read_gaussdb_version()
{
cd ${SCRIPT_DIR}
echo "${product_name}-${version_number}" > version.cfg
echo "${gaussdb_name_for_package}-${version_number}" > version.cfg
#auto read the number from kernal globals.cpp, no need to change it here
}
PG_REG_TEST_ROOT="${ROOT_DIR}"
ROACH_DIR="${ROOT_DIR}/distribute/bin/roach"
MPPDB_DECODING_DIR="${ROOT_DIR}/contrib/mppdb_decoding"
###################################
# get version number from globals.cpp
##################################
@ -55,6 +63,7 @@ function read_gaussdb_number()
fi
}
#######################################################################
##insert the commitid to version.cfg as the upgrade app path specification
#######################################################################
@ -67,6 +76,7 @@ function get_kernel_commitid()
echo "End insert commitid into version.cfg" >> "$LOG_FILE" 2>&1
}
#######################################################################
## generate the version file.
#######################################################################
@ -95,6 +105,7 @@ function make_license_control()
fi
}
#######################################################################
##back to separate_debug_symbol.sh dir
#######################################################################
@ -264,6 +275,7 @@ function install_gaussdb()
get_kernel_commitid
}
#######################################################################
##install gaussdb database and others
##select to install something according to variables package_type need

View File

@ -43,6 +43,9 @@
./share/postgresql/extension/hstore--1.0--1.1.sql
./share/postgresql/extension/log_fdw--1.0.sql
./share/postgresql/extension/log_fdw.control
./share/postgresql/extension/packages--1.0.sql
./share/postgresql/extension/packages--1.0--1.1.sql
./share/postgresql/extension/packages.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -614,6 +617,23 @@
./share/postgresql/timezone/Asia/Yakutsk
./share/postgresql/timezone/Asia/Magadan
./share/postgresql/timezone/Asia/Amman
./share/postgresql/timezone/Asia/Barnaul
./share/postgresql/timezone/Asia/Chita
./share/postgresql/timezone/Asia/Tomsk
./share/postgresql/timezone/Asia/Atyrau
./share/postgresql/timezone/Asia/Famagusta
./share/postgresql/timezone/Asia/Qostanay
./share/postgresql/timezone/Asia/Srednekolymsk
./share/postgresql/timezone/Asia/Yangon
./share/postgresql/timezone/Pacific/Bougainville
./share/postgresql/timezone/Antarctica/Troll
./share/postgresql/timezone/Europe/Astrakhan
./share/postgresql/timezone/Europe/Ulyanovsk
./share/postgresql/timezone/Europe/Kirov
./share/postgresql/timezone/Europe/Saratov
./share/postgresql/timezone/America/Fort_Nelson
./share/postgresql/timezone/America/Nuuk
./share/postgresql/timezone/America/Punta_Arenas
./share/postgresql/timezone/Asia/Kuching
./share/postgresql/timezone/Asia/Novosibirsk
./share/postgresql/timezone/Asia/Seoul
@ -673,21 +693,37 @@
./lib/libpq.so
./lib/libpq.so.5
./lib/libpq.so.5.5
./lib/libssl.so*
./lib/libcrypto.so*
./lib/libcgroup.so*
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libcgroup.so
./lib/libcgroup.so.1
./lib/libz.so*
./lib/liblz4.so*
./lib/libcjson.so*
./lib/libcjson_utils.so*
./lib/liblz4.so
./lib/liblz4.so.1
./lib/liblz4.so.1.9.3
./lib/libcjson.so
./lib/libcjson.so.1
./lib/libcjson.so.1.7.15
./lib/libcjson_utils.so
./lib/libcjson_utils.so.1
./lib/libcjson_utils.so.1.7.15
./lib/libstdc++.so.6
./lib/libgcc_s.so.1
./lib/libgomp.so*
./lib/libgomp.so
./lib/libgomp.so.1
./lib/libgomp.so.1.0.0
./lib/libdcf.so
./lib/libzstd.so*
./lib/libcurl.so*
./lib/libzstd.so
./lib/libzstd.so.1
./lib/libzstd.so.1.5.0
./lib/libcurl.so
./lib/libcurl.so.4
./lib/libcurl.so.4.7.0
./lib/libxgboost.so
./lib/libpagecompression.so*
./lib/libpagecompression.so
./lib/libpagecompression.so.1
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/postgresql/euc_kr_and_mic.so
@ -726,7 +762,6 @@
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/postgresql/pgoutput.so
./lib/libxgboost.so
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h
@ -881,13 +916,14 @@
./include/postgresql/server/lib/ilist.h
./include/postgresql/server/pgxc/locator.h
./include/postgresql/server/gstrace/gstrace_infra.h
./include/postgresql/server/db4ai/db4ai.h
[libpq]
./lib/libpq.so
./lib/libpq.so.5
./lib/libpq.so.5.5
./lib/libcrypto.so*
./lib/libssl.so*
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libssl.so
./lib/libssl.so.1.1
[header]
./include/libpq/libpq-fs.h
./include/libpq-fe.h
@ -903,4 +939,4 @@
./include/pqcomm.h
./include/pqexpbuffer.h
[version]
5.0.0
3.0.3

View File

@ -1,10 +1,4 @@
[server]
./bin/dsscmd
./bin/dssserver
./bin/perctrl
./bin/dms_contrl.sh
./bin/dss_clear.sh
./bin/dss_contrl.sh
./bin/gsql
./bin/gaussdb
./bin/gstrace
@ -40,8 +34,8 @@
./bin/kadmin.local
./bin/lz4
./bin/kadmind
./bin/dbmind
./bin/gs_dbmind
./bin/constant
./bin/server.key.cipher
./bin/server.key.rand
./bin/gs_plan_simulator.sh
@ -66,8 +60,6 @@
./share/postgresql/extension/hstore.control
./share/postgresql/extension/security_plugin.control
./share/postgresql/extension/security_plugin--1.0.sql
./share/postgresql/extension/dolphin.control
./share/postgresql/extension/dolphin--1.0.sql
./share/postgresql/extension/file_fdw--1.0.sql
./share/postgresql/extension/plpgsql.control
./share/postgresql/extension/dist_fdw.control
@ -83,9 +75,6 @@
./share/postgresql/extension/mot_fdw.control
./share/postgresql/extension/postgres_fdw--1.0.sql
./share/postgresql/extension/postgres_fdw.control
./share/postgresql/extension/dblink--1.0.sql
./share/postgresql/extension/dblink--unpackaged--1.0.sql
./share/postgresql/extension/dblink.control
./share/postgresql/timezone/GB-Eire
./share/postgresql/timezone/Turkey
./share/postgresql/timezone/Kwajalein
@ -658,6 +647,23 @@
./share/postgresql/timezone/Asia/Yakutsk
./share/postgresql/timezone/Asia/Magadan
./share/postgresql/timezone/Asia/Amman
./share/postgresql/timezone/Asia/Barnaul
./share/postgresql/timezone/Asia/Chita
./share/postgresql/timezone/Asia/Tomsk
./share/postgresql/timezone/Asia/Atyrau
./share/postgresql/timezone/Asia/Famagusta
./share/postgresql/timezone/Asia/Qostanay
./share/postgresql/timezone/Asia/Srednekolymsk
./share/postgresql/timezone/Asia/Yangon
./share/postgresql/timezone/Pacific/Bougainville
./share/postgresql/timezone/Antarctica/Troll
./share/postgresql/timezone/Europe/Astrakhan
./share/postgresql/timezone/Europe/Ulyanovsk
./share/postgresql/timezone/Europe/Kirov
./share/postgresql/timezone/Europe/Saratov
./share/postgresql/timezone/America/Fort_Nelson
./share/postgresql/timezone/America/Nuuk
./share/postgresql/timezone/America/Punta_Arenas
./share/postgresql/timezone/Asia/Kuching
./share/postgresql/timezone/Asia/Novosibirsk
./share/postgresql/timezone/Asia/Seoul
@ -756,11 +762,9 @@
./lib/postgresql/pg_plugin
./lib/postgresql/proc_srclib
./lib/postgresql/security_plugin.so
./lib/postgresql/dolphin.so
./lib/postgresql/pg_upgrade_support.so
./lib/postgresql/java/pljava.jar
./lib/postgresql/postgres_fdw.so
./lib/postgresql/dblink.so
./lib/postgresql/pgoutput.so
./lib/libpljava.so
./lib/libpq.a
@ -771,11 +775,18 @@
./lib/libpq_ce.so.5
./lib/libpq_ce.so.5.5
./lib/libgauss_cl_jni.so
./lib/libcgroup.so*
./lib/libcom_err_gauss.so*
./lib/libatomic.so*
./lib/libcgroup.so
./lib/libcgroup.so.1
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
./lib/libatomic.so
./lib/libatomic.so.1
./lib/libatomic.so.1.2.0
./lib/libmasstree.so
./lib/libupb.so*
./lib/libupb.so
./lib/libupb.so.9
./lib/libupb.so.9.0.0
./lib/libabsl_str_format_internal.so
./lib/libabsl_strings.so
./lib/libabsl_throw_delegate.so
@ -789,28 +800,59 @@
./lib/libabsl_log_severity.so
./lib/libaddress_sorting.so
./lib/libaddress_sorting.so.9
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkadm5clnt.so
./lib/libkadm5clnt_mit.so*
./lib/libkadm5clnt_mit.so
./lib/libkadm5clnt_mit.so.11
./lib/libkadm5clnt_mit.so.11.0
./lib/libkadm5clnt_mit.so.12
./lib/libkadm5clnt_mit.so.12.0
./lib/libkadm5srv.so
./lib/libkadm5srv_mit.so*
./lib/libkdb5.so*
./lib/libkrad.so*
./lib/libkrb5_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkadm5srv_mit.so
./lib/libkadm5srv_mit.so.11
./lib/libkadm5srv_mit.so.11.0
./lib/libkadm5srv_mit.so.12
./lib/libkadm5srv_mit.so.12.0
./lib/libkdb5.so
./lib/libkdb5.so.9
./lib/libkdb5.so.9.0
./lib/libkdb5.so.10
./lib/libkdb5.so.10.0
./lib/libkrad.so
./lib/libkrad.so.0
./lib/libkrad.so.0.0
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/krb5/plugins/kdb/db2.so
./lib/libverto.so*
./lib/libverto.so
./lib/libverto.so.0
./lib/libverto.so.0.0
./lib/libcurl.so*
./lib/libcrypto.so*
./lib/libssl.so*
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libgcc_s.so.1
./lib/libstdc++.so.6
./lib/libz.so*
./lib/liblz4.so*
./lib/liblz4.so
./lib/liblz4.so.1
./lib/liblz4.so.1.9.3
./lib/libcjson.so*
./lib/libconfig.so*
./lib/libconfig.so
./lib/libconfig.so.4
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./share/llvmir/GaussDB_expr.ir
@ -827,13 +869,12 @@
./lib/postgresql/latin2_and_win1250.so
./lib/postgresql/euc2004_sjis2004.so
./lib/libdcf.so
./lib/libzstd.so*
./lib/libzstd.so
./lib/libzstd.so.1
./lib/libzstd.so.1.5.0
./lib/libxgboost.so
./lib/libpagecompression.so*
./lib/libdssapi.so
./lib/libdms.so
./lib/libodbc.so*
./lib/libpagecompression.so
./lib/libpagecompression.so.1
./include/postgresql/server/postgres_ext.h
./include/postgresql/server/pg_config_os.h
./include/postgresql/server/pgtime.h
@ -961,8 +1002,8 @@
./include/postgresql/server/storage/item/itemptr.h
./include/postgresql/server/storage/lock/s_lock.h
./include/postgresql/server/storage/backendid.h
./include/postgresql/server/storage/lock/lock.h
./include/postgresql/server/storage/lock/lwlock.h
./include/postgresql/server/storage/lock.h
./include/postgresql/server/storage/lwlock.h
./include/postgresql/server/storage/lwlocknames.h
./include/postgresql/server/storage/barrier.h
./include/postgresql/server/storage/shmem.h
@ -1016,7 +1057,6 @@
./include/postgresql/server/knl/knl_guc/knl_instance_attr_resource.h
./include/postgresql/server/knl/knl_guc/knl_session_attr_common.h
./include/postgresql/server/knl/knl_guc/knl_instance_attr_common.h
./include/postgresql/server/access/ustore/knl_uverify.h
./include/postgresql/server/lib/circularqueue.h
./include/postgresql/server/access/double_write_basic.h
./include/postgresql/server/knl/knl_thread.h
@ -1126,9 +1166,6 @@
./include/postgresql/server/catalog/namespace.h
./include/postgresql/server/commands/trigger.h
./include/postgresql/server/executor/spi.h
./include/postgresql/server/db4ai/db4ai.h
./include/postgresql/server/instruments/gs_stack.h
./include/postgresql/server/instruments/instr_mfchain.h
./include/postgresql/server/access/ustore/undo/knl_uundotype.h
./include/postgresql/server/access/ustore/undo/knl_uundoapi.h
./include/postgresql/server/access/ustore/knl_uheap.h
@ -1148,44 +1185,6 @@
./include/postgresql/server/executor/exec/execdesc.h
./include/postgresql/server/db4ai/matrix.h
./include/postgresql/server/db4ai/scores.h
./include/postgresql/server/access/multixact.h
./include/postgresql/server/access/xlogutils.h
./include/postgresql/server/executor/functions.h
./include/postgresql/server/storage/lock/waitpolicy.h
./include/postgresql/server/storage/page_compression.h
./include/postgresql/server/storage/smgr/knl_usync.h
./include/postgresql/server/storage/smgr/fd.h
./include/postgresql/server/storage/smgr/smgr.h
./include/postgresql/server/storage/sharedfileset.h
./include/postgresql/server/utils/knl_globalsysdbcache.h
./include/postgresql/server/utils/knl_globaldbstatmanager.h
./include/postgresql/server/utils/knl_globalsyscache_common.h
./include/postgresql/server/utils/knl_globalbucketlist.h
./include/postgresql/server/utils/knl_globalsystabcache.h
./include/postgresql/server/utils/knl_globalsystupcache.h
./include/postgresql/server/utils/knl_globaltabdefcache.h
./include/postgresql/server/utils/knl_globalbasedefcache.h
./include/postgresql/server/utils/knl_globalpartdefcache.h
./include/postgresql/server/utils/knl_globalrelmapcache.h
./include/postgresql/server/utils/knl_localsysdbcache.h
./include/postgresql/server/utils/knl_localsystabcache.h
./include/postgresql/server/utils/knl_localsystupcache.h
./include/postgresql/server/utils/knl_localsyscache_common.h
./include/postgresql/server/utils/knl_localtabdefcache.h
./include/postgresql/server/utils/knl_localbasedefcache.h
./include/postgresql/server/utils/knl_localbucketlist.h
./include/postgresql/server/utils/knl_localpartdefcache.h
./include/postgresql/server/utils/pl_global_package_runtime_cache.h
./include/postgresql/server/catalog/pg_tablespace.h
./include/postgresql/server/catalog/pg_subscription.h
./include/postgresql/server/catalog/pg_replication_origin.h
./include/postgresql/server/postmaster/barrier_creator.h
./include/postgresql/server/postmaster/pagerepair.h
./include/postgresql/server/replication/libpqwalreceiver.h
./include/postgresql/server/replication/worker_internal.h
./include/postgresql/server/replication/origin.h
./include/postgresql/server/parser/scanner.h
./include/postgresql/server/parser/keywords.h
./jre/ASSEMBLY_EXCEPTION
./jre/bin/java
./jre/bin/jjs
@ -1371,19 +1370,33 @@
./lib/libpq_ce.so.5
./lib/libpq_ce.so.5.5
./lib/libgauss_cl_jni.so
./lib/libconfig.so*
./lib/libcrypto.so*
./lib/libconfig.so
./lib/libconfig.so.4
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libstdc++.so.6
./lib/libssl.so*
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkrb5_gauss.so*
./lib/libcom_err_gauss.so*
./lib/libcjson.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
[libpq]
./lib/libpq.a
./lib/libpq.so
@ -1393,19 +1406,33 @@
./lib/libpq_ce.so.5
./lib/libpq_ce.so.5.5
./lib/libgauss_cl_jni.so
./lib/libconfig.so*
./lib/libcrypto.so*
./lib/libconfig.so
./lib/libconfig.so.4
./lib/libcrypto.so
./lib/libcrypto.so.1.1
./lib/libstdc++.so.6
./lib/libssl.so*
./lib/libssl.so
./lib/libssl.so.1.1
./lib/libpgport_tool.so
./lib/libpgport_tool.so.1
./lib/libgssapi_krb5_gauss.so*
./lib/libgssrpc_gauss.so*
./lib/libk5crypto_gauss.so*
./lib/libkrb5support_gauss.so*
./lib/libkrb5_gauss.so*
./lib/libcom_err_gauss.so*
./lib/libcjson.so*
./lib/libgssapi_krb5_gauss.so
./lib/libgssapi_krb5_gauss.so.2
./lib/libgssapi_krb5_gauss.so.2.2
./lib/libgssrpc_gauss.so
./lib/libgssrpc_gauss.so.4
./lib/libgssrpc_gauss.so.4.2
./lib/libk5crypto_gauss.so
./lib/libk5crypto_gauss.so.3
./lib/libk5crypto_gauss.so.3.1
./lib/libkrb5support_gauss.so
./lib/libkrb5support_gauss.so.0
./lib/libkrb5support_gauss.so.0.1
./lib/libkrb5_gauss.so
./lib/libkrb5_gauss.so.3
./lib/libkrb5_gauss.so.3.3
./lib/libcom_err_gauss.so
./lib/libcom_err_gauss.so.3
./lib/libcom_err_gauss.so.3.0
./include/gs_thread.h
./include/gs_threadlocal.h
./include/postgres_ext.h

View File

@ -198,7 +198,7 @@ ENDMACRO(CHECK_CC_ENABLE)
function(GET_VERSIONSTR_FROMGIT ret)
set(PG_VERSION "9.2.4")
set(OPENGAUSS_VERSION "5.0.0")
set(OPENGAUSS_VERSION "3.0.3")
execute_process(
COMMAND ${CMAKE_SOURCE_DIR}/${openGauss}/cmake/src/buildfunction.sh --s ${PROJECT_TRUNK_DIR} OUTPUT_VARIABLE GS_VERSION_STR)
set(PG_VERSION "${PG_VERSION}" PARENT_SCOPE)

View File

@ -17,12 +17,6 @@ if(NOT ${PGPORT})
set(PGPORT 5432)
endif()
#this is the default WAL segment size (MB), the old is --with-wal-segsize=16, now -DWAL_SEGSIZE=16
option(WAL_SEGSIZE 16)
if(NOT ${WAL_SEGSIZE})
set(WAL_SEGSIZE 16)
endif()
GET_VERSIONSTR_FROMGIT(GET_PG_VERSION_STR)
#CMake does not allow g++ to compile C files. They are two different languages. You should understand what you are doing.
@ -64,7 +58,6 @@ option(ENABLE_MYSQL_FDW "enable export or import data with mysql,the old is --en
option(ENABLE_ORACLE_FDW "enable export or import data with oracle,the old is --enable-oracle-fdw" OFF)
option(BUILD_BY_CMAKE "the BUILD_BY_CMAKE is new,used in distribute pg_regress.cpp" ON)
option(DEBUG_UHEAP "collect USTORE statistics" OFF)
option(MAX_ALLOC_SEGNUM "max alloc xlog seg num in extreme_rto" 4)
#No matter what to set, the old mppdb aways use ENABLE_THREAD_SAFETY=yes by default defined.
option(ENABLE_THREAD_SAFETY "enable thread safety, the old is --enable-thread-safety" ON)
@ -74,7 +67,7 @@ option(USE_BONJOUR "enable bonjour, the old is --with-bonjour" OFF)
option(USE_LDAP "build with ldap, the old is --with-ldap" OFF)#ON
option(USE_ETCD "build with etcd libs, new option for old mppdb, after 8.1 close it" OFF)
option(USE_PROTOBUF "build with with protobuf's libs, we must need it" ON)
option(USE_LIBXML "build with libxml, the old is --with-libxml" ON)
option(USE_LIBXML "build with libxml, the old is --with-libxml" OFF)
option(HAVE_LIBXML2 "build with libxml2, the old is --with-libxml2" OFF)
option(USE_LIBXSLT "build with libxslt, the old is --with-libxslt" OFF)
option(USE_PAM "build with pam, the old is --with-pam" OFF)
@ -94,7 +87,6 @@ option(HAVE_LIBM "enable -lm, this set to default -lm" ON)
option(HAVE_POSIX_SIGNALS "enable posix signals, this set to default" ON)
option(HAVE_GCC_INT_ATOMICS "enable gcc buildin atomics operations, this set to default" ON)
option(FLEXIBLE_ARRAY_MEMBER "pq_ce need" ON)
option(ENABLE_OPENEULER_MAJOR "support openEuler 22.03 LTS, this set to default" OFF)
# we will differ compile flags and definitions by different vars
set(DB_COMMON_DEFINE "")
@ -140,30 +132,14 @@ if(${ENABLE_LITE_MODE} STREQUAL "ON")
set(ENABLE_LLVM_COMPILE OFF)
set(ENABLE_GSS OFF)
set(KRB5 OFF)
set(USE_LIBXML OFF)
endif()
if(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON")
add_definitions(-DOPENEULER_MAJOR)
endif()
set(PROTECT_OPTIONS -fwrapv -std=c++14 -fnon-call-exceptions ${OPTIMIZE_LEVEL})
set(WARNING_OPTIONS -Wall -Wendif-labels -Wformat-security)
set(WARNING_OPTIONS -Wall -Wendif-labels -Werror -Wformat-security)
set(OPTIMIZE_OPTIONS -pipe -pthread -fno-aggressive-loop-optimizations -fno-expensive-optimizations -fno-omit-frame-pointer -fno-strict-aliasing -freg-struct-return)
set(CHECK_OPTIONS -Wmissing-format-attribute -Wno-attributes -Wno-unused-but-set-variable -Wno-write-strings -Wpointer-arith)
set(MACRO_OPTIONS -D_GLIBCXX_USE_CXX11_ABI=0 -DENABLE_GSTRACE -D_GNU_SOURCE -DPGXC -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSTREAMPLAN -D_THREAD_SAFE ${DB_COMMON_DEFINE})
# Set MAX_ALLOC_SEGNUM size in extreme_rto
if(${WAL_SEGSIZE} LESS 256)
set(MAX_ALLOC_SEGNUM 4)
elseif(${WAL_SEGSIZE} GREATER_EQUAL 256 AND ${WAL_SEGSIZE} LESS 512)
set(MAX_ALLOC_SEGNUM 2)
elseif(${WAL_SEGSIZE} GREATER_EQUAL 512)
set(MAX_ALLOC_SEGNUM 1)
else()
message(FATAL_ERROR "error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512.")
endif()
# libraries need secure options during compling
set(LIB_SECURE_OPTIONS -fPIC -fno-common -fstack-protector)
# libraries need link options during linking
@ -231,7 +207,6 @@ if(${USE_LIBXML})
else()
set(LIBS "${LIBS} -lxml")
set(GAUSSDB_CONFIGURE "${GAUSSDB_CONFIGURE} -DUSE_LIBXML")
set(CMAKE_CXX_FLAGS -l:liblzma.so.5)
endif()
endif()
@ -271,36 +246,35 @@ add_definitions(-Wno-builtin-macro-redefined)
SET_GCC_FLAGS(DB_COMMON_FLAGS "")
#hotpatch
set(HOTPATCH_PLATFORM_LIST suse11_sp1_x86_64 suse12_sp5_x86_64 euleros2.0_sp8_aarch64 euleros2.0_sp9_aarch64 euleros2.0_sp10_aarch64 euleros2.0_sp2_x86_64 euleros2.0_sp5_x86_64 euleros2.0_sp10_x86_64 kylinv10_sp1_aarch64 kylinv10_sp1_x86_64)
set(HOTPATCH_ARM_LIST euleros2.0_sp8_aarch64 euleros2.0_sp9_aarch64 euleros2.0_sp10_aarch64 kylinv10_sp1_aarch64)
list(FIND HOTPATCH_PLATFORM_LIST "${PLAT_FORM_NAME}" RET_HOTPATCH)
list(FIND HOTPATCH_ARM_LIST "${PLAT_FORM_NAME}" RET_ARM_HOTPATCH)
if(NOT ${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF)
if(NOT "${RET_HOTPATCH}" STREQUAL "-1")
if("${GCC_VERSION}" STREQUAL "7.3.0")
set(RET_ARM_HOTPATCH "no")
if("${CURRENT_ARCH}" STREQUAL "aarch64")
set(RET_ARM_HOTPATCH "yes")
endif()
set(SUPPORT_HOTPATCH "no")
if(EXISTS ${LIBHOTPATCH_LIB_PATH}/libdoprapatch.a)
if(NOT ${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF)
if(NOT "${ENABLE_LITE_NODES}" STREQUAL "ON")
set(SUPPORT_HOTPATCH "yes")
if(NOT ${RET_ARM_HOTPATCH} EQUAL -1)
set(HOTPATCH_ATOMIC_LDS -Wl,-T${LIBHOTPATCH_TOOL_PATH}/atomic.lds)
endif()
else()
set(SUPPORT_HOTPATCH "no")
endif()
else()
endif()
endif()
if("${SUPPORT_HOTPATCH}_${RET_ARM_HOTPATCH}" STREQUAL "yes_yes")
set(HOTPATCH_ATOMIC_LDS -Wl,-T${LIBHOTPATCH_TOOL_PATH}/atomic.lds)
endif()
if(EXISTS ${LIBHOTPATCH_SPEC_PATH}/x86_nop.spec)
if("${ENABLE_DEBUG}" STREQUAL "ON")
set(SUPPORT_HOTPATCH "no")
endif()
else()
set(SUPPORT_HOTPATCH "no")
if("${SUPPORT_HOTPATCH}" STREQUAL "yes")
list(REMOVE_ITEM OPTIMIZE_OPTIONS -pipe)
list(APPEND OPTIMIZE_OPTIONS -specs=${LIBHOTPATCH_SPEC_PATH}/x86_nop.spec)
set(HOTPATCH_ATOMIC_LDS -Wl,-T${LIBHOTPATCH_TOOL_PATH}/atomic.lds)
endif()
endif()
if(${ENABLE_LITE_MODE} STREQUAL "ON")
set(SUPPORT_HOTPATCH "no")
endif()
if(${ENABLE_LLVM_COMPILE} STREQUAL "ON")
# LLVM version
execute_process(COMMAND ${LLVM_CONFIG} --version OUTPUT_VARIABLE LLVM_VERSION_STR OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "." ";" LLVM_VERSION_LIST ${LLVM_VERSION_STR})
message(STATUS "status ENV{LLVM_VERSION_STR}" $ENV{LLVM_VERSION_STR})
list(GET LLVM_VERSION_LIST 0 LLVM_MAJOR_VERSION)
list(GET LLVM_VERSION_LIST 1 LLVM_MINOR_VERSION)
endif()

View File

@ -116,9 +116,6 @@ function get_gs_version()
debug_str="$DEBUG_TYPE"
product=$(cat build/script/gaussdb.ver | grep 'PRODUCT' | awk -F "=" '{print $2}')
version=$(cat build/script/gaussdb.ver | grep 'VERSION' | awk -F "=" '{print $2}')
if [ "${ENABLE_LITE_MODE}" == "ON" ]; then
product="$product-lite"
fi
if test "$enable_ccache" = yes; then
default_gs_version="(${product} ${version} build 1f1f1f1f) compiled at 2100-00-00 00:00:00 commit 9999 last mr 9999 debug"
else

View File

@ -714,7 +714,7 @@
#define PGXC_VERSION_NUM
/* openGauss version as a number string */
#define OPENGAUSS_VERSION_NUM_STR "5.0.0"
#define OPENGAUSS_VERSION_NUM_STR "3.0.3"
/* A string containing the version number, platform, and C compiler */
#define PG_VERSION_STR "@PG_VERSION_STR@"
@ -870,10 +870,7 @@
/* XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2
* * and larger than XLOG_BLCKSZ (preferably, a great deal larger than
* * XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
#define XLOG_SEG_SIZE (@WAL_SEGSIZE@ * 1024 * 1024)
/* Number of max alloc xlog segment in extreme_rto, default 4 */
#define MAX_ALLOC_SEGNUM @MAX_ALLOC_SEGNUM@
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
/* Number of bits in a file offset, on hosts where this is settable. */
#cmakedefine _FILE_OFFSET_BITS

View File

@ -878,9 +878,6 @@
XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
/* Number of max alloc xlog segment in extreme_rto, default 4 */
#define MAX_ALLOC_SEGNUM 4
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

View File

@ -878,9 +878,6 @@
XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
/* Number of max alloc xlog segment in extreme_rto, default 4 */
#define MAX_ALLOC_SEGNUM 4
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

View File

@ -695,7 +695,7 @@
#define PG_VERSION "9.2.4"
/* openGauss version as a string */
#define OPENGAUSS_VERSION "5.0.0"
#define OPENGAUSS_VERSION "3.0.3"
/* Gaussdb version as a string*/
#define DEF_GS_VERSION "(GaussDB A 8.0.0 build 21f07aff) compiled at 2020-03-17 10:59:07 commit 7431 last mr 12039 debug"
@ -870,9 +870,6 @@
* XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
/* Number of max alloc xlog segment in extreme_rto, default 4 */
#define MAX_ALLOC_SEGNUM 4
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

View File

@ -59,7 +59,7 @@ set(OBS_HOME ${DEPENDENCY_PATH}/libobs/${LIB_UNIFIED_SUPPORT})
set(XML2_HOME ${DEPENDENCY_PATH}/libxml2/${SUPPORT_LLT})
set(LLVM_HOME ${DEPENDENCY_PATH}/llvm/${LIB_UNIFIED_SUPPORT})
set(LZ4_HOME ${DEPENDENCY_PATH}/lz4/${SUPPORT_LLT})
set(NANOMSG_HOME ${DEPENDENCY_PATH}/nng/${LIB_UNIFIED_SUPPORT})
set(NANOMSG_HOME ${DEPENDENCY_PATH}/nanomsg/${LIB_UNIFIED_SUPPORT})
set(NCURSES_HOME ${DEPENDENCY_PATH}/ncurses/${SUPPORT_LLT})
set(OPENSSL_HOME ${DEPENDENCY_PATH}/openssl/${LIB_UNIFIED_SUPPORT})
set(PLJAVA_HOME ${DEPENDENCY_PATH}/pljava/${LIB_UNIFIED_SUPPORT})
@ -68,16 +68,13 @@ if (EXISTS "${PLATFORM_PATH}/openjdk8/${BUILD_TUPLE}/jdk")
else()
set(JAVA_HOME ${PLATFORM_PATH}/huaweijdk8/${BUILD_TUPLE}/jdk)
endif()
set(ZLIB_HOME ${DEPENDENCY_PATH}/zlib1.2.11/${SUPPORT_LLT})
set(ZLIB_HOME ${DEPENDENCY_PATH}/zlib1.2.12/${SUPPORT_LLT})
set(XGBOOST_HOME ${DEPENDENCY_PATH}/xgboost/${SUPPORT_LLT})
set(ZSTD_HOME ${DEPENDENCY_PATH}/zstd)
set(LICENSE_HOME ${PLATFORM_PATH}/AdaptiveLM_C_V100R005C01SPC002/${SUPPORT_LLT})
set(HOTPATCH_HOME ${PLATFORM_PATH}/hotpatch)
set(SECURE_HOME ${PLATFORM_PATH}/Huawei_Secure_C/${LIB_UNIFIED_SUPPORT})
set(SECUREDYNAMICLIB_HOME ${PLATFORM_PATH}/Huawei_Secure_C/Dynamic_Lib)
set(DCF_HOME ${COMPONENT_PATH}/dcf)
set(DMS_HOME ${COMPONENT_PATH}/dms)
set(DSS_HOME ${COMPONENT_PATH}/dss)
set(MOCKCPP_HOME ${BUILDTOOLS_PATH}/mockcpp/${LIB_UNIFIED_SUPPORT})
set(GTEST_HOME ${BUILDTOOLS_PATH}/gtest/${LIB_UNIFIED_SUPPORT})
@ -265,17 +262,6 @@ set(ZSTD_LIB_PATH ${ZSTD_HOME}/lib)
set(DCF_INCLUDE_PATH ${DCF_HOME}/include)
set(DCF_LIB_PATH ${DCF_HOME}/lib)
#############################################################################
# dms component
#############################################################################
set(DMS_LIB_PATH ${DMS_HOME}/lib)
#############################################################################
# dss component
#############################################################################
set(DSS_LIB_PATH ${DSS_HOME}/lib)
set(DSS_BIN_PATH ${DSS_HOME}/bin)
#############################################################################
# license manager compnent
#############################################################################
@ -289,6 +275,7 @@ set(LIBHOTPATCH_INCLUDE_PATH ${HOTPATCH_HOME}/include)
set(LIBHOTPATCH_LIB_PATH ${HOTPATCH_HOME}/lib)
set(LIBHOTPATCH_TOOL_PATH ${HOTPATCH_HOME}/tool)
set(LIBHOTPATCH_CONFIG_PATH ${HOTPATCH_HOME}/config)
set(LIBHOTPATCH_SPEC_PATH ${HOTPATCH_HOME}/spec)
#############################################################################
# secure component

View File

@ -121,34 +121,6 @@ fi])# PGAC_C_FUNCNAME_SUPPORT
# PGAC_CHECK_BUILTIN_FUNC
# -----------------------
# This is similar to AC_CHECK_FUNCS(), except that it will work for compiler
# builtin functions, as that usually fails to.
# The first argument is the function name, eg [__builtin_clzl], and the
# second is its argument list, eg [unsigned long x]. The current coding
# works only for a single argument named x; we might generalize that later.
# It's assumed that the function's result type is coercible to int.
# On success, we define "HAVEfuncname" (there's usually more than enough
# underscores already, so we don't add another one).
AC_DEFUN([PGAC_CHECK_BUILTIN_FUNC],
[AC_CACHE_CHECK(for $1, pgac_cv$1,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
int
call$1($2)
{
return $1(x);
}], [])],
[pgac_cv$1=yes],
[pgac_cv$1=no])])
if test x"${pgac_cv$1}" = xyes ; then
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE$1]), 1,
[Define to 1 if your compiler understands $1.])
fi])# PGAC_CHECK_BUILTIN_FUNC
# PGAC_PROG_CC_CFLAGS_OPT
# -----------------------
# Given a string, check if the compiler supports the string as a

318
configure vendored
View File

@ -709,7 +709,6 @@ with_selinux
krb_srvtab
with_python
with_openeuler_os
with_openeuler_major
enable_thread_safety
INCLUDES
TAS
@ -829,7 +828,6 @@ enable_nls
with_pgport
with_gs_version
with_openeuler_os
with_openeuler_major
enable_shared
enable_rpath
enable_jemalloc
@ -2197,7 +2195,7 @@ PACKAGE_VERSION='9.2.4'
# Postgres-XC 1.1devel is based on PostgreSQL 9.2.4
PACKAGE_XC_VERSION='1.1'
# openGauss is based on PostgreSQL 9.2.4 and it will be the Kernel of GaussDB database
OPENGAUSS_VERSION='5.0.0'
OPENGAUSS_VERSION='3.0.3'
cat >>confdefs.h <<_ACEOF
#define PG_VERSION "$PACKAGE_VERSION"
@ -3274,9 +3272,6 @@ _ACEOF
fi
if [ "$(cat /etc/system-release)" == "openEuler release 22.03 LTS" ]; then
with_openeuler_major=yes
fi
#
# --enable-coverage enables generation of code coverage metrics with gcov
@ -3715,11 +3710,8 @@ case ${wal_segsize} in
16) ;;
32) ;;
64) ;;
128) ;;
256) ;;
512) ;;
*) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512." >&5
$as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512." >&2;}
*) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
$as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
{ (exit 1); exit 1; }; }
esac
{ $as_echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
@ -3730,18 +3722,6 @@ cat >>confdefs.h <<_ACEOF
#define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
_ACEOF
# Set number of MAX_ALLOC_SEGNUM in extreme_rto
if test "${wal_segsize}" -lt 256; then
MAX_ALLOC_SEGNUM=4
elif test "${wal_segsize}" -ge 256 -a "${wal_segsize}" -lt 512; then
MAX_ALLOC_SEGNUM=2
else
MAX_ALLOC_SEGNUM=1
fi
cat >>confdefs.h <<_ACEOF
#define MAX_ALLOC_SEGNUM ${MAX_ALLOC_SEGNUM}
_ACEOF
#
# C compiler
@ -6481,11 +6461,7 @@ fi
# XML
#
if [[ "$enable_lite_mode" != yes ]]; then
with_libxml=yes
else
with_libxml=no
fi
# Check whether --with-libxml was given.
if test "${with_libxml+set}" = set; then
@ -6513,11 +6489,10 @@ else
fi
xml2_cflag=${with_3rdpartydir}/kernel/dependency/libxml2/comm/include/libxml2
xml2_lib=${with_3rdpartydir}/kernel/dependency/libxml2/comm/lib
xml2_config=${with_3rdpartydir}/kernel/dependency/libxml2/comm/bin/xml2-config
if test "$with_libxml" = yes ; then
for ac_prog in ${xml2_config}
for ac_prog in xml2-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@ -6546,7 +6521,7 @@ IFS=$as_save_IFS
fi
fi
XML2_CONFIG=$xml2_config
XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
if test -n "$XML2_CONFIG"; then
{ $as_echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
$as_echo "$XML2_CONFIG" >&6; }
@ -6562,12 +6537,12 @@ done
if test -n "$XML2_CONFIG"; then
for pgac_option in `$XML2_CONFIG --cflags`; do
case $pgac_option in
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option -I${xml2_cflag}";;
-I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
esac
done
for pgac_option in `$XML2_CONFIG --libs`; do
case $pgac_option in
-L*) LDFLAGS="$LDFLAGS $pgac_option -L${xml2_lib}";;
-L*) LDFLAGS="$LDFLAGS $pgac_option";;
esac
done
fi
@ -9851,7 +9826,7 @@ if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-L${xml2_lib} -lxml2 -lm -ldl $LIBS"
LIBS="-lxml2 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@ -13443,7 +13418,6 @@ done
fi
if test "$with_libxml" = yes ; then
CPPFLAGS="-I${xml2_cflag} $CPPFLAGS"
if test "${ac_cv_header_libxml_parser_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
$as_echo_n "checking for libxml/parser.h... " >&6; }
@ -18226,47 +18200,9 @@ fi
# On PPC, check if assembler supports LWARX instruction's mutex hint bit
case $host_cpu in
x86_64)
# On x86_64, check if we can compile a popcntq instruction
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
$as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
if ${pgac_cv_have_x86_64_popcntq+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
long long x = 1; long long r;
__asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
pgac_cv_have_x86_64_popcntq=yes
else
pgac_cv_have_x86_64_popcntq=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
$as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
$as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
fi
;;
ppc*|powerpc*)
{ $as_echo "$as_me:$LINENO: checking whether assembler supports lwarx hint bit" >&5
$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@ -18310,7 +18246,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $pgac_cv_have_ppc_mutex_hint" >&5
$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
@ -24890,237 +24825,6 @@ cat >>confdefs.h <<_ACEOF
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF
# These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
$as_echo_n "checking for __builtin_bswap16... " >&6; }
if ${pgac_cv__builtin_bswap16+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_bswap16(int x)
{
return __builtin_bswap16(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_bswap16=yes
else
pgac_cv__builtin_bswap16=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
$as_echo "$pgac_cv__builtin_bswap16" >&6; }
if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_BSWAP16 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
$as_echo_n "checking for __builtin_bswap32... " >&6; }
if ${pgac_cv__builtin_bswap32+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_bswap32(int x)
{
return __builtin_bswap32(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_bswap32=yes
else
pgac_cv__builtin_bswap32=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
$as_echo "$pgac_cv__builtin_bswap32" >&6; }
if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_BSWAP32 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
$as_echo_n "checking for __builtin_bswap64... " >&6; }
if ${pgac_cv__builtin_bswap64+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_bswap64(long int x)
{
return __builtin_bswap64(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_bswap64=yes
else
pgac_cv__builtin_bswap64=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
$as_echo "$pgac_cv__builtin_bswap64" >&6; }
if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_BSWAP64 1
_ACEOF
fi
# We assume that we needn't test all widths of these explicitly:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
$as_echo_n "checking for __builtin_clz... " >&6; }
if ${pgac_cv__builtin_clz+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_clz(unsigned int x)
{
return __builtin_clz(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_clz=yes
else
pgac_cv__builtin_clz=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
$as_echo "$pgac_cv__builtin_clz" >&6; }
if test x"${pgac_cv__builtin_clz}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_CLZ 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
$as_echo_n "checking for __builtin_ctz... " >&6; }
if ${pgac_cv__builtin_ctz+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_ctz(unsigned int x)
{
return __builtin_ctz(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_ctz=yes
else
pgac_cv__builtin_ctz=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
$as_echo "$pgac_cv__builtin_ctz" >&6; }
if test x"${pgac_cv__builtin_ctz}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_CTZ 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
$as_echo_n "checking for __builtin_popcount... " >&6; }
if ${pgac_cv__builtin_popcount+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
call__builtin_popcount(unsigned int x)
{
return __builtin_popcount(x);
}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
pgac_cv__builtin_popcount=yes
else
pgac_cv__builtin_popcount=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
$as_echo "$pgac_cv__builtin_popcount" >&6; }
if test x"${pgac_cv__builtin_popcount}" = xyes ; then
cat >>confdefs.h <<_ACEOF
#define HAVE__BUILTIN_POPCOUNT 1
_ACEOF
fi
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects

View File

@ -381,10 +381,7 @@ case ${wal_segsize} in
16) ;;
32) ;;
64) ;;
128) ;;
256) ;;
512) ;;
*) AC_MSG_ERROR([Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512.])
*) AC_MSG_ERROR([Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64.])
esac
AC_MSG_RESULT([${wal_segsize}MB])
@ -396,16 +393,6 @@ AC_DEFINE_UNQUOTED([XLOG_SEG_SIZE], [(${wal_segsize} * 1024 * 1024)], [
Changing XLOG_SEG_SIZE requires an initdb.
])
# Set number of MAX_ALLOC_SEGNUM in extreme_rto
if test "${wal_segsize}" -lt 256; then
MAX_ALLOC_SEGNUM=4
elif test "${wal_segsize}" -ge 256 -a "${wal_segsize}" -lt 512; then
MAX_ALLOC_SEGNUM=2
else
MAX_ALLOC_SEGNUM=1
fi
AC_DEFINE_UNQUOTED(MAX_ALLOC_SEGNUM, $MAX_ALLOC_SEGNUM, [Define the max alloc segnum in extreme_rto.])
#
# C compiler
#
@ -1186,19 +1173,6 @@ fi
# On PPC, check if assembler supports LWARX instruction's mutex hint bit
case $host_cpu in
x86_64)
# On x86_64, check if we can compile a popcntq instruction
AC_CACHE_CHECK([whether assembler supports x86_64 popcntq],
[pgac_cv_have_x86_64_popcntq],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[long long x = 1; long long r;
__asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));])],
[pgac_cv_have_x86_64_popcntq=yes],
[pgac_cv_have_x86_64_popcntq=no])])
if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
AC_DEFINE(HAVE_X86_64_POPCNTQ, 1, [Define to 1 if the assembler supports X86_64's POPCNTQ instruction.])
fi
;;
ppc*|powerpc*)
AC_MSG_CHECKING([whether assembler supports lwarx hint bit])
AC_TRY_COMPILE([],
@ -1247,9 +1221,6 @@ LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
AC_CHECK_FUNCS([cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid sigprocmask symlink sync_file_range towlower utime utimes waitpid wcstombs wcstombs_l])
# We assume that we needn't test all widths of these explicitly:
PGAC_CHECK_BUILTIN_FUNC([__builtin_clz], [unsigned int x])
AC_REPLACE_FUNCS(fseeko)
case $host_os in
# NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos

View File

@ -19,7 +19,7 @@
PG_MODULE_MAGIC;
extern "C" void _PG_init(void);
void _PG_init(void);
/* GUC Variables */
static int auth_delay_milliseconds;

View File

@ -46,8 +46,8 @@ static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
#define auto_explain_enabled() \
(auto_explain_log_min_duration >= 0 && (nesting_level == 0 || auto_explain_log_nested_statements))
extern "C" void _PG_init(void);
extern "C" void _PG_fini(void);
void _PG_init(void);
void _PG_fini(void);
static void explain_ExecutorStart(QueryDesc* queryDesc, int eflags);
static void explain_ExecutorRun(QueryDesc* queryDesc, ScanDirection direction, long count);

View File

@ -61,6 +61,19 @@ static int32 gbt_textcmp(const void* a, const void* b, Oid collation)
return DatumGetInt32(DirectFunctionCall2Coll(bttextcmp, collation, PointerGetDatum(a), PointerGetDatum(b)));
}
static Datum gbt_rtrim1(PG_FUNCTION_ARGS)
{
text* string = PG_GETARG_TEXT_PP(0);
text* ret = NULL;
ret = dotrim(VARDATA_ANY(string), VARSIZE_ANY_EXHDR(string), " ", 1, false, true);
if ((ret == NULL || 0 == VARSIZE_ANY_EXHDR(ret)) && u_sess->attr.attr_sql.sql_compatibility == A_FORMAT)
PG_RETURN_NULL();
else
PG_RETURN_TEXT_P(ret);
}
static gbtree_vinfo tinfo = {
gbt_t_text, 0, FALSE, gbt_textgt, gbt_textge, gbt_texteq, gbt_textle, gbt_textlt, gbt_textcmp, NULL};
@ -91,7 +104,7 @@ Datum gbt_bpchar_compress(PG_FUNCTION_ARGS)
if (entry->leafkey) {
Datum d = DirectFunctionCall1(rtrim1, entry->key);
Datum d = DirectFunctionCall1(gbt_rtrim1, entry->key);
GISTENTRY trim;
gistentryinit(trim, d, entry->rel, entry->page, entry->offset, TRUE);
@ -135,7 +148,7 @@ Datum gbt_bpchar_consistent(PG_FUNCTION_ARGS)
bool retval = false;
GBT_VARKEY* key = (GBT_VARKEY*)DatumGetPointer(entry->key);
GBT_VARKEY_R r = gbt_var_key_readable(key);
void* trim = (void*)DatumGetPointer(DirectFunctionCall1(rtrim1, PointerGetDatum(query)));
void* trim = (void*)DatumGetPointer(DirectFunctionCall1(gbt_rtrim1, PointerGetDatum(query)));
/* All cases served by this function are exact */
*recheck = false;

View File

@ -3,7 +3,7 @@
MODULE_big = dblink
OBJS = dblink.o
PG_CPPFLAGS = -I$(libpq_srcdir)
SHLIB_LINK = $(libpq) -L$(LIBODBC_LIB_PATH) -lodbc
SHLIB_LINK = $(libpq)
SHLIB_PREREQS = submake-libpq
EXTENSION = dblink

View File

@ -221,8 +221,3 @@ CREATE FUNCTION dblink_get_notify(
RETURNS setof record
AS 'MODULE_PATHNAME', 'dblink_get_notify'
LANGUAGE C STRICT;
CREATE FUNCTION dblink_get_drivername()
RETURNS text
AS 'MODULE_PATHNAME', 'dblink_get_drivername'
LANGUAGE C STRICT;

View File

@ -44,4 +44,3 @@ ALTER EXTENSION dblink ADD function dblink_cancel_query(text);
ALTER EXTENSION dblink ADD function dblink_error_message(text);
ALTER EXTENSION dblink ADD function dblink_get_notify();
ALTER EXTENSION dblink ADD function dblink_get_notify(text);
ALTER EXTENSION dblink ADD function dblink_get_drivername();

File diff suppressed because it is too large Load Diff

View File

@ -35,113 +35,6 @@
#define DBLINK_H
#include "fmgr.h"
#include "sql.h"
#include "sqlext.h"
typedef struct ODBCconn {
SQLHENV envHandle; /* Handle ODBC environment */
SQLHDBC connHandle; /* Handle connection */
SQLHSTMT stmt; /* Handle sql */
} ODBCconn;
typedef struct storeInfo {
FunctionCallInfo fcinfo;
Tuplestorestate* tuplestore;
AttInMetadata* attinmeta;
MemoryContext tmpcontext;
char** cstrs;
/* temp storage for results to avoid leaks on exception */
PGresult* last_res;
PGresult* cur_res;
} storeInfo;
typedef struct LinkInfo {
SQLCHAR* username; /* odbc username */
SQLCHAR* password; /* odbc password */
SQLCHAR* drivername; /* odbc driver name */
} LinkInfo;
class Linker : public BaseObject {
public:
virtual void finish() = 0;
virtual text* exec(char* conname, const char* sql, bool fail) = 0;
virtual char* errorMsg() = 0;
virtual int isBusy() = 0;
virtual char* cancel(PGcancel* cancel) = 0;
virtual int sendQuery(char* sql) = 0;
virtual char* open(char* conname, char* sql, bool fail) = 0;
virtual char* close(char* conname, char* sql, bool fail) = 0;
virtual void getResult(char* conname, FunctionCallInfo fcinfo, char* sql, bool fail) = 0;
virtual void queryResult(ReturnSetInfo* rsinfo, const char* conname, storeInfo* sinfo, const char* sql, bool fail) = 0;
virtual void fetch(char* conname, FunctionCallInfo fcinfo, const char* sql, bool fail, char* curname) = 0;
virtual void getNotify(ReturnSetInfo* rsinfo) = 0;
};
typedef struct remoteConn {
Linker* linker;
} remoteConn;
typedef struct dblink_session_context {
remoteConn* pconn;
HTAB* remoteConnHash;
} dblink_session_context;
/*
* Following is list that holds multiple remote connections.
* Calling convention of each dblink function changes to accept
* connection name as the first parameter. The connection list is
* much like ecpg e.g. a mapping between a name and a PGconn object.
*/
typedef struct remoteConnHashEnt {
char name[NAMEDATALEN];
remoteConn* rconn;
} remoteConnHashEnt;
class PQLinker : public Linker {
public:
PGconn* conn;
PGresult* res;
int openCursorCount; /* The number of open cursors */
bool newXactForCursor; /* Opened a transaction for a cursor */
public:
PQLinker(char* connstr);
void finish();
text* exec(char* conname, const char* sql, bool fail);
char* errorMsg();
int isBusy();
char* cancel(PGcancel* cancel);
int sendQuery(char* sql);
char* open(char* conname, char* sql, bool fail);
char* close(char* conname, char* sql, bool fail);
void getResult(char* conname, FunctionCallInfo fcinfo, char* sql, bool fail);
void queryResult(ReturnSetInfo* rsinfo, const char* conname, storeInfo* sinfo, const char* sql, bool fail);
void fetch(char* conname, FunctionCallInfo fcinfo, const char* sql, bool fail, char* curname);
void getNotify(ReturnSetInfo* rsinfo);
};
class ODBCLinker : public Linker {
public:
SQLHENV envHandle; /* Handle ODBC environment */
SQLHDBC connHandle; /* Handle connection */
SQLHSTMT stmt; /* Handle sql */
public:
ODBCLinker(char* connstr_or_name);
void finish();
text* exec(char* conname, const char* sql, bool fail);
char* errorMsg();
int isBusy();
char* cancel(PGcancel* cancel);
int sendQuery(char* sql);
char* open(char* conname, char* sql, bool fail);
char* close(char* conname, char* sql, bool fail);
void getResult(char* conname, FunctionCallInfo fcinfo, char* sql, bool fail);
void queryResult(ReturnSetInfo* rsinfo, const char* conname, storeInfo* sinfo, const char* sql, bool fail);
void fetch(char* conname, FunctionCallInfo fcinfo, const char* sql, bool fail, char* curname);
void getNotify(ReturnSetInfo* rsinfo);
};
/*
* External declarations
@ -165,7 +58,6 @@ extern "C" Datum dblink_build_sql_delete(PG_FUNCTION_ARGS);
extern "C" Datum dblink_build_sql_update(PG_FUNCTION_ARGS);
extern "C" Datum dblink_current_query(PG_FUNCTION_ARGS);
extern "C" Datum dblink_get_notify(PG_FUNCTION_ARGS);
extern "C" Datum dblink_get_drivername(PG_FUNCTION_ARGS);
extern "C" void set_extension_index(uint32 index);
extern "C" void init_session_vars(void);

View File

@ -106,8 +106,8 @@ PG_FUNCTION_INFO_V1(file_fdw_validator);
*/
static void fileGetForeignRelSize(PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid);
static void fileGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid);
static ForeignScan *fileGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntableid,
ForeignPath *best_path, List *tlist, List *scan_clauses, Plan *outer_plan);
static ForeignScan* fileGetForeignPlan(PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid,
ForeignPath* best_path, List* tlist, List* scan_clauses);
static void fileExplainForeignScan(ForeignScanState* node, ExplainState* es);
static void fileBeginForeignScan(ForeignScanState* node, int eflags);
static TupleTableSlot* fileIterateForeignScan(ForeignScanState* node);
@ -375,7 +375,7 @@ static List* get_file_fdw_attribute_options(Oid relid)
/* Retrieve FDW options for all user-defined attributes. */
for (attnum = 1; attnum <= natts; attnum++) {
Form_pg_attribute attr = &tupleDesc->attrs[attnum - 1];
Form_pg_attribute attr = tupleDesc->attrs[attnum - 1];
List* options = NIL;
ListCell* lc = NULL;
@ -452,9 +452,8 @@ static void fileGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid fore
startup_cost,
total_cost,
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no outer path either */
NIL)); /* no fdw_private data */
NULL, /* no outer rel either */
NIL)); /* no fdw_private data */
/*
* If data file was sorted, and we knew it somehow, we could insert
@ -465,10 +464,10 @@ static void fileGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid fore
/*
* fileGetForeignPlan
* Create a ForeignScan plan node for scanning the foreign table
* Create a ForeignScan plan node for scanning the foreign table
*/
static ForeignScan *fileGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntableid,
ForeignPath *best_path, List *tlist, List *scan_clauses, Plan *outer_plan)
static ForeignScan* fileGetForeignPlan(
PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid, ForeignPath* best_path, List* tlist, List* scan_clauses)
{
Index scan_relid = baserel->relid;
@ -486,11 +485,8 @@ static ForeignScan *fileGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel, O
scan_clauses,
scan_relid,
NIL, /* no expressions to evaluate */
NIL, /* no private state either */
NIL,
NIL,
NULL,
EXEC_ON_DATANODES);
EXEC_ON_DATANODES); /* no private state either */
}
/*
@ -712,7 +708,7 @@ static void estimate_size(PlannerInfo* root, RelOptInfo* baserel, FileFdwPlanSta
*/
int tuple_width;
tuple_width = MAXALIGN(baserel->reltarget->width) + MAXALIGN(sizeof(HeapTupleHeaderData));
tuple_width = MAXALIGN(baserel->width) + MAXALIGN(sizeof(HeapTupleHeaderData));
ntuples = clamp_row_est((double)stat_buf.st_size / (double)tuple_width);
baserel->tuples = ntuples;

View File

@ -745,7 +745,7 @@ List* build_tlist_to_deparse(RelOptInfo* foreignrel)
* We require columns specified in foreignrel->reltarget->exprs and those
* required for evaluating the local conditions.
*/
tlist = foreignrel->reltarget->exprs;
tlist = foreignrel->reltargetlist;
foreach (lc, fpinfo->local_conds) {
RestrictInfo* rinfo = lfirst_node(RestrictInfo, lc);
@ -929,7 +929,7 @@ static void gcdeparseTargetList(StringInfo buf, PlannerInfo* root, Index rtindex
have_wholerow = bms_is_member(0 - FirstLowInvalidHeapAttributeNumber, attrs_used);
for (i = 1; i <= tupdesc->natts; i++) {
Form_pg_attribute attr = &tupdesc->attrs[i - 1];
Form_pg_attribute attr = tupdesc->attrs[i - 1];
/* Ignore dropped attributes. */
if (attr->attisdropped)
@ -1015,7 +1015,7 @@ static void gcDeparseLockingClause(deparse_expr_cxt* context)
* that DECLARE CURSOR ... FOR UPDATE is supported, which it isn't
* before 8.3.
*/
if (relid == linitial2_int(root->parse->resultRelations) &&
if (relid == root->parse->resultRelation &&
(root->parse->commandType == CMD_UPDATE || root->parse->commandType == CMD_DELETE)) {
/* Relation is UPDATE/DELETE target, so use FOR UPDATE */
appendStringInfoString(buf, " FOR UPDATE");
@ -1122,7 +1122,7 @@ static void gcDeparseSubqueryTargetList(deparse_expr_cxt* context)
/* Should only be called in these cases. */
Assert(IS_SIMPLE_REL(foreignrel) || IS_JOIN_REL(foreignrel));
foreach (lc, foreignrel->reltarget->exprs) {
foreach (lc, foreignrel->reltargetlist) {
Node* node = (Node*)lfirst(lc);
if (!first)
@ -2213,7 +2213,7 @@ static void get_relation_column_alias_ids(Var* node, RelOptInfo* foreignrel, int
/* Get the column alias ID */
i = 1;
foreach (lc, foreignrel->reltarget->exprs) {
foreach (lc, foreignrel->reltargetlist) {
if (equal(lfirst(lc), (Node*)node)) {
*colno = i;
return;

View File

@ -348,7 +348,7 @@ static void gcGetForeignRelSize(PlannerInfo* root, RelOptInfo* baserel, Oid fore
* columns used in them. Doesn't seem worth detecting that case though.)
*/
fpinfo->attrs_used = NULL;
pull_varattnos((Node*)baserel->reltarget->exprs, baserel->relid, &fpinfo->attrs_used);
pull_varattnos((Node*)baserel->reltargetlist, baserel->relid, &fpinfo->attrs_used);
foreach (lc, fpinfo->local_conds) {
RestrictInfo* rinfo = lfirst_node(RestrictInfo, lc);
@ -390,7 +390,7 @@ static void gcGetForeignRelSize(PlannerInfo* root, RelOptInfo* baserel, Oid fore
baserel->pages = 10;
const int BLOCK_NUM = 10;
baserel->tuples =
(double)(BLOCK_NUM * BLCKSZ) / (baserel->reltarget->width + MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)));
(double)(BLOCK_NUM * BLCKSZ) / (baserel->width + MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)));
}
/* Estimate baserel size as best we can with local statistics. */
@ -448,9 +448,8 @@ static void gcGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid foreig
fpinfo->startup_cost,
fpinfo->total_cost,
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no outer path either */
NIL, /* no fdw_private list */
NULL, /* no outer rel either */
NIL, /* no fdw_private list */
u_sess->opt_cxt.query_dop);
add_path(root, baserel, (Path*)path);
}
@ -460,7 +459,7 @@ static void gcGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid foreig
* Create ForeignScan plan node which implements selected best path
*/
static ForeignScan* gcGetForeignPlan(PlannerInfo* root, RelOptInfo* foreignrel, Oid foreigntableid,
ForeignPath* best_path, List* tlist, List* scan_clauses, Plan* outer_plan)
ForeignPath* best_path, List* tlist, List* scan_clauses)
{
GcFdwRelationInfo* fpinfo = (GcFdwRelationInfo*)foreignrel->fdw_private;
Index scan_relid;
@ -618,8 +617,7 @@ static ForeignScan* gcGetForeignPlan(PlannerInfo* root, RelOptInfo* foreignrel,
* field of the finished plan node; we can't keep them in private state
* because then they wouldn't be subject to later planner processing.
*/
return make_foreignscan(tlist, local_exprs, scan_relid, params_list, fdw_private, NIL, NIL, NULL,
EXEC_ON_DATANODES);
return make_foreignscan(tlist, local_exprs, scan_relid, params_list, fdw_private, EXEC_ON_DATANODES);
}
/*
@ -702,7 +700,7 @@ static void gcBeginForeignScan(ForeignScanState* node, int eflags)
for (int i = 0; i < list_length(fsstate->retrieved_attrs); i++) {
int attidx = list_nth_int(fsstate->retrieved_attrs, i);
Form_pg_attribute attr = &slot->tts_tupleDescriptor->attrs[attidx - 1];
Form_pg_attribute attr = slot->tts_tupleDescriptor->attrs[attidx - 1];
const char* attname = (const char*)(attr->attname.data);
TupleDescInitEntry(scan_desc, i + 1, attname, attr->atttypid, attr->atttypmod, 0);
}
@ -747,8 +745,8 @@ static void gcBeginForeignScan(ForeignScanState* node, int eflags)
fsstate->resultSlot->tts_isnull[i] = true;
}
fsstate->resultSlot->tts_flags &= ~TTS_FLAG_EMPTY;
fsstate->scanSlot->tts_flags &= ~TTS_FLAG_EMPTY;
fsstate->resultSlot->tts_isempty = false;
fsstate->scanSlot->tts_isempty = false;
fsstate->attinmeta = TupleDescGetAttInMetadata(fsstate->tupdesc);
@ -864,7 +862,7 @@ static void postgresConstructResultSlotWithArray(ForeignScanState* node)
for (scanAttr = 0, resultAttr = 0; resultAttr < resultDesc->natts; resultAttr++, scanAttr += map) {
Assert(list_length(colmap) == resultDesc->natts);
Oid typoid = resultDesc->attrs[resultAttr].atttypid;
Oid typoid = resultDesc->attrs[resultAttr]->atttypid;
Value* val = (Value*)list_nth(colmap, resultAttr);
map = val->val.ival;
@ -919,7 +917,7 @@ static void postgresConstructResultSlotWithArray(ForeignScanState* node)
}
resultSlot->tts_nvalid = resultDesc->natts;
resultSlot->tts_flags &= ~TTS_FLAG_EMPTY;
resultSlot->tts_isempty = false;
}
static void postgresMapResultFromScanSlot(ForeignScanState* node)
@ -958,7 +956,7 @@ static TupleTableSlot* gcIterateNormalForeignScan(ForeignScanState* node)
/* reset tupleslot on the begin */
(void)ExecClearTuple(fsstate->resultSlot);
fsstate->resultSlot->tts_flags &= ~TTS_FLAG_EMPTY;
fsstate->resultSlot->tts_isempty = false;
TupleTableSlot* slot = node->ss.ss_ScanTupleSlot;
@ -1469,7 +1467,7 @@ static void gc_estimate_path_cost_size(PlannerInfo* root, RelOptInfo* foreignrel
* between foreign relations.
*/
rows = foreignrel->rows;
width = foreignrel->reltarget->width;
width = foreignrel->width;
/* Back into an estimate of the number of retrieved rows. */
retrieved_rows = clamp_row_est(rows / fpinfo->local_conds_sel);
@ -1813,17 +1811,17 @@ static void gcfdw_fetch_remote_table_info(
pq_sendint(&retbuf, tupdesc->natts, 4);
for (int i = 0; i < tupdesc->natts; i++) {
att_name_len = strlen(tupdesc->attrs[i].attname.data);
att_name_len = strlen(tupdesc->attrs[i]->attname.data);
pq_sendint(&retbuf, att_name_len, 4);
pq_sendbytes(&retbuf, tupdesc->attrs[i].attname.data, att_name_len);
pq_sendbytes(&retbuf, tupdesc->attrs[i]->attname.data, att_name_len);
Assert(InvalidOid != tupdesc->attrs[i].atttypid);
Assert(InvalidOid != tupdesc->attrs[i]->atttypid);
type_name = get_typename(tupdesc->attrs[i].atttypid);
type_name = get_typename(tupdesc->attrs[i]->atttypid);
type_name_len = strlen(type_name);
pq_sendint(&retbuf, type_name_len, 4);
pq_sendbytes(&retbuf, type_name, type_name_len);
pq_sendint(&retbuf, tupdesc->attrs[i].atttypmod, 4);
pq_sendint(&retbuf, tupdesc->attrs[i]->atttypmod, 4);
pfree(type_name);
}
@ -2368,7 +2366,7 @@ static void conversion_error_callback(void *arg)
TupleDesc tupdesc = RelationGetDescr(errpos->rel);
if (errpos->cur_attno > 0 && errpos->cur_attno <= tupdesc->natts) {
attname = NameStr(tupdesc->attrs[errpos->cur_attno - 1].attname);
attname = NameStr(tupdesc->attrs[errpos->cur_attno - 1]->attname);
} else if (errpos->cur_attno == SelfItemPointerAttributeNumber) {
attname = "ctid";
} else if (errpos->cur_attno == ObjectIdAttributeNumber) {
@ -2588,7 +2586,7 @@ static void GcFdwCopyRemoteInfo(PgFdwRemoteInfo* new_remote_info, PgFdwRemoteInf
bool hasSpecialArrayType(TupleDesc desc)
{
for (int i = 0; i < desc->natts; i++) {
Oid typoid = desc->attrs[i].atttypid;
Oid typoid = desc->attrs[i]->atttypid;
if (INT8ARRAYOID == typoid || FLOAT8ARRAYOID == typoid || FLOAT4ARRAYOID == typoid || NUMERICARRAY == typoid) {
return true;

View File

@ -72,8 +72,12 @@ static void gcGetForeignPaths(PlannerInfo* root, RelOptInfo* baserel, Oid foreig
return;
}
static ForeignScan *gcGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntableid,
ForeignPath *best_path, List *tlist, List *scan_clauses, Plan *outer_plan)
static ForeignScan *gcGetForeignPlan(PlannerInfo *root,
RelOptInfo *baserel,
Oid foreigntableid,
ForeignPath *best_path,
List *tlist,
List *scan_clauses)
{
DISTRIBUTED_FEATURE_NOT_SUPPORTED();
return NULL;

View File

@ -702,15 +702,15 @@ Datum hstore_from_record(PG_FUNCTION_ARGS)
for (i = 0, j = 0; i < ncolumns; ++i) {
ColumnIOData* column_info = &my_extra->columns[i];
Oid column_type = tupdesc->attrs[i].atttypid;
Oid column_type = tupdesc->attrs[i]->atttypid;
char* value = NULL;
/* Ignore dropped columns in datatype */
if (tupdesc->attrs[i].attisdropped)
if (tupdesc->attrs[i]->attisdropped)
continue;
pairs[j].key = NameStr(tupdesc->attrs[i].attname);
pairs[j].keylen = hstoreCheckKeyLen(strlen(NameStr(tupdesc->attrs[i].attname)));
pairs[j].key = NameStr(tupdesc->attrs[i]->attname);
pairs[j].keylen = hstoreCheckKeyLen(strlen(NameStr(tupdesc->attrs[i]->attname)));
if (nulls == NULL || nulls[i]) {
pairs[j].val = NULL;
@ -864,18 +864,18 @@ Datum hstore_populate_record(PG_FUNCTION_ARGS)
for (i = 0; i < ncolumns; ++i) {
ColumnIOData* column_info = &my_extra->columns[i];
Oid column_type = tupdesc->attrs[i].atttypid;
Oid column_type = tupdesc->attrs[i]->atttypid;
char* value = NULL;
int idx;
int vallen;
/* Ignore dropped columns in datatype */
if (tupdesc->attrs[i].attisdropped) {
if (tupdesc->attrs[i]->attisdropped) {
nulls[i] = true;
continue;
}
idx = hstoreFindKey(hs, 0, NameStr(tupdesc->attrs[i].attname), strlen(NameStr(tupdesc->attrs[i].attname)));
idx = hstoreFindKey(hs, 0, NameStr(tupdesc->attrs[i]->attname), strlen(NameStr(tupdesc->attrs[i]->attname)));
/*
* we can't just skip here if the key wasn't found since we might have
@ -903,7 +903,7 @@ Datum hstore_populate_record(PG_FUNCTION_ARGS)
* checks are done
*/
values[i] =
InputFunctionCall(&column_info->proc, NULL, column_info->typioparam, tupdesc->attrs[i].atttypmod);
InputFunctionCall(&column_info->proc, NULL, column_info->typioparam, tupdesc->attrs[i]->atttypmod);
nulls[i] = true;
} else {
vallen = HS_VALLEN(entries, idx);
@ -913,7 +913,7 @@ Datum hstore_populate_record(PG_FUNCTION_ARGS)
value[vallen] = 0;
values[i] =
InputFunctionCall(&column_info->proc, value, column_info->typioparam, tupdesc->attrs[i].atttypmod);
InputFunctionCall(&column_info->proc, value, column_info->typioparam, tupdesc->attrs[i]->atttypmod);
nulls[i] = false;
}
}

View File

@ -6,7 +6,6 @@
#include "access/gist.h"
#include "access/skey.h"
#include "port/pg_bitutils.h"
#include "_int.h"
@ -30,6 +29,264 @@ extern "C" Datum g_intbig_picksplit(PG_FUNCTION_ARGS);
extern "C" Datum g_intbig_union(PG_FUNCTION_ARGS);
extern "C" Datum g_intbig_same(PG_FUNCTION_ARGS);
/* Number of one-bits in an unsigned byte */
static const uint8 number_of_ones[256] = {0,
1,
1,
2,
1,
2,
2,
3,
1,
2,
2,
3,
2,
3,
3,
4,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
4,
5,
5,
6,
5,
6,
6,
7,
5,
6,
6,
7,
6,
7,
7,
8};
PG_FUNCTION_INFO_V1(_intbig_in);
extern "C" Datum _intbig_in(PG_FUNCTION_ARGS);
@ -171,7 +428,11 @@ Datum g_intbig_compress(PG_FUNCTION_ARGS)
static int4 sizebitvec(BITVECP sign)
{
return pg_popcount(sign, SIGLEN);
int4 size = 0, i;
LOOPBYTE
size += number_of_ones[(unsigned char)sign[i]];
return size;
}
static int hemdistsign(BITVECP a, BITVECP b)
@ -181,8 +442,7 @@ static int hemdistsign(BITVECP a, BITVECP b)
LOOPBYTE
{
diff = (unsigned char)(a[i] ^ b[i]);
/* Using the popcount functions here isn't likely to win */
dist += pg_number_of_ones[diff];
dist += number_of_ones[diff];
}
return dist;
}

View File

@ -1530,7 +1530,7 @@ static void fill_pglog_planstate_from_logft_rel(pglogPlanState* pg_log, Relation
Assert(PGLOG_ATTR_MAX == tupdesc->natts);
for (int i = 0; i < PGLOG_ATTR_MAX; ++i) {
Form_pg_attribute att = &tupdesc->attrs[i];
Form_pg_attribute att = tupdesc->attrs[i];
pg_log->allattr_typmod[i] = att->atttypmod;
getTypeInputInfo(att->atttypid, &in_func_oid, &pg_log->allattr_typioparam[i]);
fmgr_info(in_func_oid, &pg_log->allattr_fmgrinfo[i]);
@ -2722,8 +2722,8 @@ static void log_rescan_foreign_scan(ForeignScanState* node)
(void)MemoryContextSwitchTo(old_memcnxt);
}
static ForeignScan* log_get_foreign_plan(PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid,
ForeignPath* best_path, List* tlist, List* scan_clauses, Plan* outer_plan)
static ForeignScan* log_get_foreign_plan(
PlannerInfo* root, RelOptInfo* baserel, Oid foreigntableid, ForeignPath* best_path, List* tlist, List* scan_clauses)
{
Index scan_relid = baserel->relid;
List* fdw_data = best_path->fdw_private;
@ -2773,9 +2773,6 @@ static ForeignScan* log_get_foreign_plan(PlannerInfo* root, RelOptInfo* baserel,
scan_relid,
NIL, /* no expressions to evaluate */
fdw_data,
NIL,
NIL,
NULL,
EXEC_ON_DATANODES); /* no private state either */
return fscan;
@ -2799,7 +2796,6 @@ static void log_get_foreign_paths(PlannerInfo* root, RelOptInfo* baserel, Oid fo
total_cost,
NIL, /* no pathkeys */
NULL, /* no outer rel either */
NULL, /* no outer path either */
NIL,
1)); /* no fdw_private data */

View File

@ -10,7 +10,6 @@
#include "access/gist.h"
#include "access/skey.h"
#include "port/pg_bitutils.h"
#include "crc32.h"
#include "ltree.h"
@ -35,6 +34,264 @@ extern "C" Datum _ltree_consistent(PG_FUNCTION_ARGS);
#define GETENTRY(vec, pos) ((ltree_gist*)DatumGetPointer((vec)->vector[(pos)].key))
#define NEXTVAL(x) ((ltree*)((char*)(x) + INTALIGN(VARSIZE(x))))
/* Number of one-bits in an unsigned byte */
static const uint8 number_of_ones[256] = {0,
1,
1,
2,
1,
2,
2,
3,
1,
2,
2,
3,
2,
3,
3,
4,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
4,
5,
5,
6,
5,
6,
6,
7,
5,
6,
6,
7,
6,
7,
7,
8};
#define WISH_F(a, b, c) (double)(-(double)(((a) - (b)) * ((a) - (b)) * ((a) - (b))) * (c))
static void hashing(BITVECP sign, ltree* t)
@ -174,7 +431,11 @@ Datum _ltree_union(PG_FUNCTION_ARGS)
static int4 sizebitvec(BITVECP sign)
{
return pg_popcount((const char *) sign, ASIGLEN);
int4 size = 0, i;
ALOOPBYTE
size += number_of_ones[(unsigned char)sign[i]];
return size;
}
static int hemdistsign(BITVECP a, BITVECP b)
@ -184,8 +445,7 @@ static int hemdistsign(BITVECP a, BITVECP b)
ALOOPBYTE
{
diff = (unsigned char)(a[i] ^ b[i]);
/* Using the popcount functions here isn't likely to win */
dist += pg_number_of_ones[diff];
dist += number_of_ones[diff];
}
return dist;
}

2
contrib/mppdb_decoding/mppdb_decoding.cpp Normal file → Executable file
View File

@ -241,7 +241,7 @@ static void TupleToJsoninfo(Relation relation, cJSON* cols_name, cJSON* cols_typ
Datum origval = 0; /* possibly toasted Datum */
bool isnull = false; /* column is null? */
Form_pg_attribute attr = &tupdesc->attrs[natt]; /* the attribute itself */
Form_pg_attribute attr = tupdesc->attrs[natt]; /* the attribute itself */
/*
* don't print dropped columns, we can't be sure everything is

View File

@ -11,7 +11,7 @@
extern char* optarg;
#include "libpq/libpq-fe.h"
#include "libpq-fe.h"
/* an extensible array to keep track of elements to show */
typedef struct {

View File

@ -1,8 +1,5 @@
#This is the main CMAKE for build all pagehack.
# pagehack
execute_process(
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/dss/dss_adaptor.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dss_adaptor.cpp
)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_pagehack_SRC)
set(TGT_pagehack_INC
${TGT_pq_INC} ${ZSTD_INCLUDE_PATH} ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SRC_DIR}/lib/gstrace ${PROJECT_SRC_DIR}/lib/page_compression
@ -14,13 +11,13 @@ if(${ENABLE_DEBUG} STREQUAL "ON")
endif()
set(pagehack_COMPILE_OPTIONS ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${CHECK_OPTIONS} ${BIN_SECURE_OPTIONS} ${OPTIMIZE_OPTIONS})
set(pagehack_LINK_OPTIONS ${BIN_LINK_OPTIONS})
set(pagehack_LINK_LIBS -lpgport -lcrypt -ldl -lm -ledit -lssl -lcrypto -l${SECURE_C_CHECK} -lrt -lz -lminiunz -lzstd -lpagecompression -llz4)
set(pagehack_LINK_LIBS -lpgport -lcrypt -ldl -lm -ledit -lssl -lcrypto -lsecurec -lrt -lz -lminiunz -lzstd -lpagecompression)
add_bintarget(pagehack TGT_pagehack_SRC TGT_pagehack_INC "${pagehack_DEF_OPTIONS}" "${pagehack_COMPILE_OPTIONS}" "${pagehack_LINK_OPTIONS}" "${pagehack_LINK_LIBS}")
add_dependencies(pagehack pgport_static pagecompression)
target_link_directories(pagehack PUBLIC
${LIBOPENSSL_LIB_PATH} ${LIBCURL_LIB_PATH} ${SECURE_LIB_PATH}
${ZLIB_LIB_PATH} ${LIBOBS_LIB_PATH} ${LIBEDIT_LIB_PATH} ${LIBCGROUP_LIB_PATH} ${CMAKE_BINARY_DIR}/lib
${ZSTD_LIB_PATH} ${LZ4_LIB_PATH} ${PROJECT_SRC_DIR}/lib/page_compression
${ZSTD_LIB_PATH} ${PROJECT_SRC_DIR}/lib/page_compression
)
install(TARGETS pagehack RUNTIME DESTINATION bin)

View File

@ -1,7 +1,6 @@
# contrib/pagehack/Makefile
MODULE_big = pagehack
OBJS = pagehack.o \
$(top_builddir)/src/gausskernel/storage/dss/dss_adaptor.o
OBJS = pagehack.o
# executable program, even there is no database server/client
PROGRAM = pagehack
@ -17,7 +16,7 @@ top_builddir = ../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS += -I${top_builddir}/src/lib/page_compression
override LDFLAGS += -L${top_builddir}/src/lib/page_compression
override CFLAGS += -lpagecompression -lzstd -llz4
override CFLAGS += -lpagecompression -lzstd
ifeq ($(enable_debug), yes)
PG_CPPFLAGS += -DDEBUG
endif

191
contrib/pagehack/pagehack.cpp Normal file → Executable file
View File

@ -46,7 +46,6 @@
#include <time.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <new>
#include "access/heapam.h"
#include "access/htup.h"
@ -80,8 +79,6 @@
#include "storage/smgr/relfilenode.h"
#include "storage/sinval.h"
#include "storage/smgr/segment.h"
#include "storage/dss/dss_adaptor.h"
#include "storage/file/fio_device.h"
#include "replication/bcm.h"
#include "utils/datetime.h"
#include "utils/memutils.h"
@ -90,7 +87,6 @@
#include "cstore.h"
#include "common/build_query/build_query.h"
#include <libgen.h>
#include "tool_common.h"
#ifdef ENABLE_MULTIPLE_NODES
#include "tsdb/utils/constant_def.h"
#endif
@ -103,7 +99,6 @@
#define CLASS_TYPE_NUM 512
#define TEN 10
typedef unsigned char* binary;
static const char* indents[] = { // 10 tab is enough to used.
"",
@ -153,6 +148,7 @@ typedef enum SegmentType {
SEG_UHEAP,
SEG_INDEX_BTREE,
SEG_UNDO,
SEG_INDEX_URQ,
SEG_UNKNOWN
} SegmentType;
@ -196,7 +192,6 @@ static ParseHeapTupleData PgIndexRelTupleParser[] = {ParseToastIndexTupleData};
static int PgHeapRelTupleParserCursor = -1;
static int PgIndexRelTupleParserCursor = -1;
/* For Assert(...) macros. */
THR_LOCAL bool assert_enabled = true;
@ -205,7 +200,6 @@ bool only_vm = false;
bool only_bcm = false;
bool write_back = false;
bool dirty_page = false;
bool enable_dss = false;
int start_item = 1;
int num_item = 0;
int SegNo = 0;
@ -826,6 +820,7 @@ typedef enum HackingType {
HACKING_UNDO_RECORD,
HACKING_UNDO_FIX,
HACKING_SEGMENT,
HACKING_INDEX_URQ,
NUM_HACKINGTYPE
} HackingType;
@ -852,7 +847,8 @@ static const char* HACKINGTYPE[] = {"heap",
"undo_slot",
"undo_record",
"undo_fix",
"segment"
"segment",
"btree_index_urq"
};
const char* PageTypeNames[] = {"DATA", "FSM", "VM"};
@ -1020,9 +1016,6 @@ static void usage(const char* progname)
" -d only for test, use 0xFF to fill the last half page[4k]\n"
" -z only for undo space/group meta, dump the specified space/group\n"
" -S heap file segment number\n"
"\nDss options:\n"
" -D enable shared storage mode\n"
" -c SOCKETPATH dss connect socket file path\n"
"\nCommon options:\n"
" --help, -h show this help, then exit\n"
" --version, -V output version information, then exit\n");
@ -2581,7 +2574,7 @@ static void parse_btree_index_item(const Item item, unsigned len, int blkno, int
/* there are xmin/xmax */
UstoreIndexXid uxid = (UstoreIndexXid)UstoreIndexTupleGetXid(itup);
fprintf(stdout,
"%s xmin:%d xmax:%d Heap Tid: block %u/%u, offset %u\n",
"%s xmin:%u xmax:%u Heap Tid: block %u/%u, offset %u\n",
indents[indentLevel],
uxid->xmin,
uxid->xmax,
@ -2807,6 +2800,7 @@ static void parse_special_data(const char* buffer, SegmentType type)
fprintf(stdout, "\tbtree cycle ID: %u\n", opaque->btpo_cycleid);
if (uopaque) {
(void)fprintf(stdout, "\tubtree xidbase: %lu\n", uopaque->xid_base);
fprintf(stdout, "\tubtree active tuples: %d\n", uopaque->activeTupleCount);
}
} else if (SEG_UHEAP == type) {
@ -3059,6 +3053,67 @@ static void parse_fsm_page(const char *buffer, int blkno)
fprintf(stdout, "\n");
}
static bool UrqIsMetaPage(BlockNumber blkno)
{
const int FirstNormalBlockNumber = 2;
return blkno < FirstNormalBlockNumber;
}
static uint32 UrqGetBlockMaxItems(BlockNumber blkno)
{
uint32 freeSpace = BLCKSZ - sizeof(PageHeaderData) - offsetof(UBTRecycleQueueHeaderData, items);
if (UrqIsMetaPage(blkno)) {
freeSpace -= sizeof(UBTRecycleMetaData);
}
return freeSpace / sizeof(UBTRecycleQueueItemData);
}
static UBTRecycleQueueHeader UrqGetRecycleQueueHeader(Page page, BlockNumber blkno)
{
if (!UrqIsMetaPage(blkno)) {
return (UBTRecycleQueueHeader)PageGetContents(page);
}
return (UBTRecycleQueueHeader)(((char*)PageGetContents(page)) + sizeof(UBTRecycleMetaData));
}
static void ParseBtreeIndexUrq(const char *buffer, int blkno)
{
const int baseIndent = 1;
const int indent1 = baseIndent + 1;
const int indent2 = indent1 + 1;
(void)fprintf(stdout, "\n%sRecycle queue information on this page\n", indents[baseIndent]);
if (UrqIsMetaPage((BlockNumber)blkno)) {
UBTRecycleMeta meta = (UBTRecycleMeta)(PageGetContents((Page)buffer));
(void)fprintf(stdout, "%sMeta: #%u\n", indents[indent1], blkno);
(void)fprintf(stdout, "%sflags: %u\n", indents[indent2], meta->flags);
(void)fprintf(stdout, "%sheadBlkno: %u\n", indents[indent2], meta->headBlkno);
(void)fprintf(stdout, "%stailBlkno: %u\n", indents[indent2], meta->tailBlkno);
(void)fprintf(stdout, "%snblocksUpper: %u\n", indents[indent2], meta->nblocksUpper);
(void)fprintf(stdout, "%snblocksLower: %u\n", indents[indent2], meta->nblocksLower);
}
UBTRecycleQueueHeader header = UrqGetRecycleQueueHeader((Page)buffer, (BlockNumber)blkno);
uint32 maxItem = UrqGetBlockMaxItems((BlockNumber)blkno);
(void)fprintf(stdout, "%sBlock: #%d, flags: %u, head:%d, tail:%d, ",
indents[indent1], blkno, header->flags, header->head, header->tail);
(void)fprintf(stdout, "freeItems:%d, freeListHead:%d, prevBlkno:%u, nextBlkno:%u\n",
header->freeItems, header->freeListHead, header->prevBlkno, header->nextBlkno);
for (uint32 i = 0; i < maxItem; i++) {
UBTRecycleQueueItem item = &(header->items[i]);
if (item->xid == 0 && item->blkno == 0 && item->prev == 0 && item->next == 0) {
continue;
}
(void)fprintf(stdout, "%s#%3d, xid: %lu, blkno: %3u, prev: %3d, next: %3d\n",
indents[indent2], i, item->xid, item->blkno, item->prev, item->next);
}
(void)fprintf(stdout, "%sSummary (%u total): %u used, %d free\n\n",
indents[baseIndent], maxItem, maxItem - header->freeItems, header->freeItems);
}
static bool parse_data_page(const char *buffer, int blkno, SegmentType type)
{
if (only_vm || only_bcm) {
@ -3068,6 +3123,8 @@ static bool parse_data_page(const char *buffer, int blkno, SegmentType type)
parse_heap_or_index_page(buffer, blkno, type);
} else if (type == SEG_FSM) {
parse_fsm_page(buffer, blkno);
} else if (type == SEG_INDEX_URQ) {
ParseBtreeIndexUrq(buffer, blkno);
}
return true;
}
@ -3109,10 +3166,10 @@ static BlockNumber CalculateMaxBlockNumber(BlockNumber blknum, BlockNumber start
{
/* parse */
if (start >= blknum) {
(void)fprintf(stderr, "start point exceeds the total block number of relation.\n");
fprintf(stderr, "start point exceeds the total block number of relation.\n");
return InvalidBlockNumber;
} else if ((start + number) > blknum) {
(void)fprintf(stderr, "don't have %u blocks from block %u in the relation, only %u blocks\n", number, start,
fprintf(stderr, "don't have %d blocks from block %d in the relation, only %d blocks\n", number, start,
(blknum - start));
number = blknum;
} else if (number == 0) {
@ -3125,26 +3182,22 @@ static BlockNumber CalculateMaxBlockNumber(BlockNumber blknum, BlockNumber start
static void MarkBufferDirty(char *buffer, size_t len)
{
size_t writeLen = len / 2;
int writeLen = len / 2;
unsigned char fill_byte[writeLen] = {0xFF};
for (size_t i = 0; i < writeLen; i++)
for (int i = 0; i < writeLen; i++)
fill_byte[i] = 0xFF;
auto rc = memcpy_s(buffer + writeLen, len - writeLen, fill_byte, writeLen);
auto rc = memcpy_s(buffer + writeLen, BLCKSZ - writeLen, fill_byte, writeLen);
securec_check(rc, "", "");
}
static int parse_page_file(const char *filename, SegmentType type, const uint32 start_point, const uint32 number_read)
{
if (!IsCompressedFile(filename, strlen(filename))) {
if (type != SEG_HEAP && type != SEG_INDEX_BTREE) {
return parse_uncompressed_page_file(filename, type, start_point, number_read);
}
PageCompression *pageCompression = new(std::nothrow) PageCompression();
if (pageCompression == NULL) {
fprintf(stderr, "compression page new failed\n");
return false;
}
if (pageCompression->Init(filename, (BlockNumber)SegNo) != SUCCESS) {
auto pageCompression = new PageCompression();
if (pageCompression->Init(filename, MAXPGPATH, SegNo) != SUCCESS) {
delete pageCompression;
return parse_uncompressed_page_file(filename, type, start_point, number_read);
}
@ -3159,16 +3212,15 @@ static int parse_page_file(const char *filename, SegmentType type, const uint32
char compressed[BLCKSZ];
char decompressed[BLCKSZ];
while (start < number) {
size_t compressedSize = pageCompression->ReadCompressedBuffer(start, compressed, BLCKSZ);
if (compressedSize > MIN_COMPRESS_ERROR_RT) {
fprintf(stderr, "read block %u failed, filename: %s: code: %lu %s\n",
start, filename, compressedSize, strerror(errno));
auto compressedSize = pageCompression->ReadCompressedBuffer(start, compressed, BLCKSZ);
if (compressedSize == 0) {
fprintf(stderr, "read block %d failed, filename: %s_pcd: %s\n", start, filename, strerror(errno));
delete pageCompression;
return false;
}
char *parseFile = NULL;
if (compressedSize < BLCKSZ) {
(void)pageCompression->DecompressedPage(compressed, decompressed);
pageCompression->DecompressedPage(compressed, decompressed);
parseFile = decompressed;
} else {
parseFile = compressed;
@ -3183,7 +3235,7 @@ static int parse_page_file(const char *filename, SegmentType type, const uint32
MarkBufferDirty(parseFile, BLCKSZ);
}
if (!pageCompression->WriteBackUncompressedData(compressed, compressedSize, parseFile, BLCKSZ, start)) {
fprintf(stderr, "write back failed, filename: %s: %s\n", filename, strerror(errno));
fprintf(stderr, "write back failed, filename: %s_pcd: %s\n", filename, strerror(errno));
delete pageCompression;
return false;
}
@ -3205,8 +3257,7 @@ static int parse_uncompressed_page_file(const char *filename, SegmentType type,
BlockNumber number = number_read;
size_t result;
fd = fopen(filename, "rb+");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb+"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -3433,8 +3484,7 @@ static bool parse_internal_init_file(char* filename)
return false;
}
fp = fopen(filename, "rb");
if (fp == NULL) {
if (NULL == (fp = fopen(filename, "rb"))) {
result = false;
fprintf(stderr, "IO error when opening %s: %s\n", filename, strerror(errno));
goto read_failed;
@ -3665,8 +3715,7 @@ static int parse_filenodemap_file(char* filename)
}
fill_filenode_map(pg_class_map);
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -3751,8 +3800,7 @@ static int parse_cu_file(char* filename, uint64 offset)
errno_t rc = snprintf_s(fullpath, sizeof(fullpath), sizeof(fullpath) - 1, "%s.%d", filename, seg_num);
securec_check_ss_c(rc, "\0", "\0");
fd = fopen(fullpath, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(fullpath, "rb"))) {
fprintf(stderr, "%s: %s\n", fullpath, strerror(errno));
return false;
}
@ -3811,8 +3859,7 @@ static int parse_slot_file(char* filename)
size_t readBytes = 0;
pg_crc32 checksum = 0;
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -3909,8 +3956,7 @@ static int parse_gaussdb_state_file(char* filename)
char* BuildModeStr[] = {"node", "auto", "full", "incremental"};
XLogRecPtr lsn;
uint32 term;
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -3972,8 +4018,7 @@ static int parse_pg_control_file(char* filename)
char sysident_str[32];
const char* strftime_fmt = "%c";
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -4108,8 +4153,7 @@ static int parse_clog_file(char* filename)
xid = (uint64)segnum * segnum_xid;
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
return false;
}
@ -4164,8 +4208,7 @@ static int parse_csnlog_file(char* filename)
xid = (uint64)segnum * segnum_xid;
fd = fopen(filename, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(filename, "rb"))) {
fprintf(stderr, "%s: %s\n", filename, gs_strerror(errno));
return false;
}
@ -4422,7 +4465,7 @@ static bool parse_dw_file(const char* file_name, uint32 start_page, uint32 page_
(void)dirname(meta_full_path);
/* extract the meta name from DW_META_FILE */
rc = strcpy_s(meta_name_tmp, PATH_MAX, T_DW_META_FILE);
rc = strcpy_s(meta_name_tmp, PATH_MAX, DW_META_FILE);
securec_check(rc, "", "");
meta_name = basename(meta_name_tmp);
@ -4433,6 +4476,7 @@ static bool parse_dw_file(const char* file_name, uint32 start_page, uint32 page_
securec_check(rc, "", "");
fd = fopen(meta_full_path, "rb+");
if (fd == NULL) {
fprintf(stderr, "%s: %s\n", meta_full_path, strerror(errno));
return false;
@ -4598,7 +4642,8 @@ static bool parse_segment_head(char *filename, uint32 start_page)
}
bool result;
int fd = open(filename, O_RDONLY, S_IRUSR | S_IWUSR);
int fd = open(filename, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "Failed to open %s: %s\n", filename, strerror(errno));
free(buf);
@ -4669,8 +4714,7 @@ static bool parse_dw_single_flush_file(const char* file_name)
char *dw_block = (char *)TYPEALIGN(BLCKSZ, unaligned_buf2);
PageHeader pghr = NULL;
fd = fopen(file_name, "rb");
if (fd == NULL) {
if (NULL == (fd = fopen(file_name, "rb"))) {
fprintf(stderr, "%s: %s\n", file_name, gs_strerror(errno));
free(item);
free(unaligned_buf);
@ -5384,7 +5428,6 @@ static void fill_filenode_map(char** class_map)
{"pg_extension", 3079},
{"pg_foreign_table", 3118},
{"pg_enum", 3501},
{"pg_set", 3516},
{"pg_seclabel", 3596},
{"pg_ts_dict", 3600},
{"pg_ts_parser", 3601},
@ -5436,7 +5479,6 @@ static void fill_filenode_map(char** class_map)
{"pg_cast_source_target_index", 2661},
{"pg_class_oid_index", 2662},
{"pg_class_relname_nsp_index", 2663},
{"pg_collation_enc_def_index", 3147},
{"pg_collation_name_enc_nsp_index", 3164},
{"pg_collation_oid_index", 3085},
{"pg_constraint_conname_nsp_index", 2664},
@ -5588,7 +5630,6 @@ int main(int argc, char** argv)
char* filename = NULL;
char* env = NULL;
const char* progname = NULL;
const char* socketpath = NULL;
uint32 start_point = 0;
uint32 num_block = 0;
uint64 cu_offset = 0;
@ -5613,7 +5654,7 @@ int main(int argc, char** argv)
setvbuf(stderr, NULL, _IONBF, 0);
#endif
while ((c = getopt(argc, argv, "bc:Df:o:t:vs:z:n:r:i:I:N:uwdS:")) != -1) {
while ((c = getopt(argc, argv, "bf:o:t:vs:z:n:r:i:I:N:uwdS:")) != -1) {
switch (c) {
case 'f':
filename = optarg;
@ -5719,15 +5760,6 @@ int main(int argc, char** argv)
SegNo = (unsigned int)strtolSafe(optarg, 0);
break;
case 'D':
enable_dss = true;
break;
case 'c':
socketpath = optarg;
enable_dss = true;
break;
default:
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
@ -5750,19 +5782,10 @@ int main(int argc, char** argv)
exit(1);
}
if (enable_dss && socketpath == NULL) {
fprintf(stderr, "Socketpath cannot be NULL when enable dss.\n");
exit(1);
}
if (enable_dss && (filename[0] != '+' || strstr(filename, "/") == NULL)) {
fprintf(stderr, "Filepath should be absolutely when enable dss.\n");
exit(1);
}
if (((start_point != 0) || (num_block != 0)) &&
/* only heap/index/undo/dw */
(hackingtype > HACKING_UNDO && hackingtype != HACKING_DW && hackingtype != HACKING_SEGMENT)) {
(hackingtype > HACKING_UNDO && hackingtype != HACKING_DW && hackingtype != HACKING_SEGMENT &&
hackingtype != HACKING_INDEX_URQ)) {
fprintf(stderr, "Start point or block number only takes effect when hacking segment/heap/undo/index.\n");
start_point = num_block = 0;
}
@ -5788,13 +5811,6 @@ int main(int argc, char** argv)
pgdata = env;
}
// dss device init
if (dss_device_init(socketpath, enable_dss) != DSS_SUCCESS) {
exit(1);
}
initDataPathStruct(false);
// if heap relation name is given (-r), force hackingtype to be HACKING_HEAP
if (PgHeapRelTupleParserCursor >= 0) {
hackingtype = HACKING_HEAP;
@ -5835,6 +5851,13 @@ int main(int argc, char** argv)
}
break;
case HACKING_INDEX_URQ:
if (!parse_page_file(filename, SEG_INDEX_URQ, start_point, num_block)) {
(void)fprintf(stderr, "Error during parsing index urq file %s\n", filename);
exit(1);
}
break;
case HACKING_FILENODE:
if (!parse_filenodemap_file(filename)) {
fprintf(stderr, "Error during parsing filenode_map file %s\n", filename);

View File

@ -435,7 +435,7 @@ static void parse_compress_meta(StringInfo outputBuf, char* page_content, Relati
int size = PageGetSpecialSize(page_header);
TupleDesc desc = RelationGetDescr(rel);
FormData_pg_attribute* att = desc->attrs;
Form_pg_attribute* att = desc->attrs;
int attrno;
int attrnum = desc->natts;
@ -444,7 +444,7 @@ static void parse_compress_meta(StringInfo outputBuf, char* page_content, Relati
char mode = 0;
for (attrno = 0; attrno < attrnum && cmprsOff < size; ++attrno) {
Form_pg_attribute thisatt = &att[attrno];
Form_pg_attribute thisatt = att[attrno];
int metaSize = 0;
metaInfo = PageCompress::FetchAttrCmprMeta(start + cmprsOff, thisatt->attlen, &metaSize, &mode);

View File

@ -30,7 +30,7 @@ PG_MODULE_MAGIC;
/* passwords shorter than this will be rejected */
#define MIN_PWD_LENGTH 8
extern "C" void _PG_init(void);
extern void _PG_init(void);
/*
* check_password

View File

@ -223,14 +223,12 @@ static void pgss_ExecutorStart(QueryDesc* queryDesc, int eflags);
static void pgss_ExecutorRun(QueryDesc* queryDesc, ScanDirection direction, long count);
static void pgss_ExecutorFinish(QueryDesc* queryDesc);
static void pgss_ExecutorEnd(QueryDesc* queryDesc);
static void pgss_ProcessUtility(processutility_context* processutility_cxt,
static void pgss_ProcessUtility(Node* parsetree, const char* queryString, ParamListInfo params, bool isTopLevel,
DestReceiver* dest,
#ifdef PGXC
bool sentToRemote,
#endif /* PGXC */
char* completionTag,
ProcessUtilityContext context,
bool isCTAS);
char* completionTag);
static uint32 pgss_hash_fn(const void* key, Size keysize);
static int pgss_match_fn(const void* key1, const void* key2, Size keysize);
static uint32 pgss_hash_string(const char* str);
@ -724,17 +722,13 @@ static void pgss_ExecutorEnd(QueryDesc* queryDesc)
/*
* ProcessUtility hook
*/
static void pgss_ProcessUtility(processutility_context* processutility_cxt,
static void pgss_ProcessUtility(Node* parsetree, const char* queryString, ParamListInfo params, bool isTopLevel,
DestReceiver* dest,
#ifdef PGXC
bool sentToRemote,
#endif /* PGXC */
char* completionTag,
ProcessUtilityContext context,
bool isCTAS)
char* completionTag)
{
Node* parsetree = processutility_cxt->parse_tree;
const char* queryString = processutility_cxt->query_string;
/*
* If it's an EXECUTE statement, we don't track it and don't increment the
* nesting level. This allows the cycles to be charged to the underlying
@ -760,23 +754,25 @@ static void pgss_ProcessUtility(processutility_context* processutility_cxt,
PG_TRY();
{
if (prev_ProcessUtility)
prev_ProcessUtility(processutility_cxt,
prev_ProcessUtility(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,
#endif /* PGXC */
completionTag,
context,
isCTAS);
completionTag);
else
standard_ProcessUtility(processutility_cxt,
standard_ProcessUtility(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,
#endif /* PGXC */
completionTag,
context,
isCTAS);
completionTag);
nested_level--;
}
PG_CATCH();
@ -821,23 +817,25 @@ static void pgss_ProcessUtility(processutility_context* processutility_cxt,
pgss_store(queryString, queryId, INSTR_TIME_GET_MILLISEC(duration), rows, &bufusage, NULL);
} else {
if (prev_ProcessUtility)
prev_ProcessUtility(processutility_cxt,
prev_ProcessUtility(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,
#endif /* PGXC */
completionTag,
context,
isCTAS);
completionTag);
else
standard_ProcessUtility(processutility_cxt,
standard_ProcessUtility(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,
#endif /* PGXC */
completionTag,
context,
isCTAS);
completionTag);
}
}
@ -1860,7 +1858,7 @@ static void fill_in_constant_lengths(pgssJumbleState* jstate, const char* query)
locs = jstate->clocations;
/* initialize the flex scanner --- should match raw_parser() */
yyscanner = scanner_init(query, &yyextra, &ScanKeywords, ScanKeywordTokens);
yyscanner = scanner_init(query, &yyextra, ScanKeywords, NumScanKeywords);
/* Search for each constant, in sequence */
for (i = 0; i < jstate->clocations_count; i++) {

View File

@ -8,9 +8,6 @@ DATA = pg_trgm--1.0.sql pg_trgm--unpackaged--1.0.sql
REGRESS = pg_trgm
exclude_option = -fPIE
override CPPFLAGS := $(filter-out $(exclude_option),$(CPPFLAGS))
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)

View File

@ -3,7 +3,6 @@
*/
#include "postgres.h"
#include "knl/knl_variable.h"
#include "port/pg_bitutils.h"
#include "trgm.h"
@ -41,6 +40,264 @@ extern "C" Datum gtrgm_picksplit(PG_FUNCTION_ARGS);
#define GETENTRY(vec, pos) ((TRGM*)DatumGetPointer((vec)->vector[(pos)].key))
/* Number of one-bits in an unsigned byte */
static const uint8 number_of_ones[256] = {0,
1,
1,
2,
1,
2,
2,
3,
1,
2,
2,
3,
2,
3,
3,
4,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
1,
2,
2,
3,
2,
3,
3,
4,
2,
3,
3,
4,
3,
4,
4,
5,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
2,
3,
3,
4,
3,
4,
4,
5,
3,
4,
4,
5,
4,
5,
5,
6,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
3,
4,
4,
5,
4,
5,
5,
6,
4,
5,
5,
6,
5,
6,
6,
7,
4,
5,
5,
6,
5,
6,
6,
7,
5,
6,
6,
7,
6,
7,
7,
8};
Datum gtrgm_in(PG_FUNCTION_ARGS)
{
elog(ERROR, "not implemented");
@ -420,7 +677,11 @@ Datum gtrgm_same(PG_FUNCTION_ARGS)
static int4 sizebitvec(BITVECP sign)
{
return pg_popcount(sign, SIGLEN);
int4 size = 0, i;
LOOPBYTE
size += number_of_ones[(unsigned char)sign[i]];
return size;
}
static int hemdistsign(BITVECP a, BITVECP b)
@ -430,8 +691,7 @@ static int hemdistsign(BITVECP a, BITVECP b)
LOOPBYTE
{
diff = (unsigned char)(a[i] ^ b[i]);
/* Using the popcount functions here isn't likely to win */
dist += pg_number_of_ones[diff];
dist += number_of_ones[diff];
}
return dist;
}

View File

@ -26,8 +26,6 @@ execute_process(
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/access/rmgrdesc/uheapdesc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/uheapdesc.cpp
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/access/rmgrdesc/undologdesc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/undologdesc.cpp
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/access/rmgrdesc/replorigindesc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/replorigindesc.cpp
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/smgr/cfs/cfs_mddesc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cfs_mddesc.cpp
COMMAND ln -fs ${PROJECT_SRC_DIR}/gausskernel/storage/dss/dss_adaptor.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dss_adaptor.cpp
)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_xlogdump_SRC)
@ -45,4 +43,4 @@ target_link_directories(pg_xlogdump PUBLIC
${ZLIB_LIB_PATH} ${LIBOBS_LIB_PATH} ${LIBEDIT_LIB_PATH} ${LIBCGROUP_LIB_PATH} ${CMAKE_BINARY_DIR}/lib
)
install(TARGETS pg_xlogdump RUNTIME DESTINATION bin)
install(TARGETS pg_xlogdump RUNTIME DESTINATION bin)

View File

@ -5,10 +5,8 @@ PGAPPICON=win32
PROGRAM = pg_xlogdump
OBJS = pg_xlogdump.o compat.o xlogreader.o xlogreader_common.o rmgrdesc.o \
$(top_builddir)/src/gausskernel/storage/smgr/cfs/cfs_mddesc.o \
$(top_builddir)/src/lib/pgcommon/libpgcommon.a \
$(RMGRDESCOBJS) $(WIN32RES) \
$(top_builddir)/src/gausskernel/storage/dss/dss_adaptor.o
$(RMGRDESCOBJS) $(WIN32RES)
RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/gausskernel/storage/access/rmgrdesc/*desc.cpp))
RMGRDESCOBJS = $(patsubst %.cpp,%.o,$(RMGRDESCSOURCES))

View File

@ -145,36 +145,41 @@ ForkNumber forkname_to_number(const char* forkName)
/*
* relpathbackend - construct path to a relation's file
*/
char *relpathbackend(RelFileNode rnode, BackendId backend, ForkNumber forknum)
char* relpathbackend(RelFileNode rnode, BackendId backend, ForkNumber forknum)
{
int pathlen;
char *path = NULL;
errno_t rc = EOK;
char* path = NULL;
/* Column store file path, e.g: 16384_C1.0, 16384_C1_bcm */
if (forknum > MAX_FORKNUM) {
char attr_name[32];
int attid = forknum - MAX_FORKNUM;
path = (char *)calloc(MAXPGPATH, sizeof(char));
rc = snprintf_s(attr_name, sizeof(attr_name), sizeof(attr_name) - 1, "C%d", attid);
securec_check_ss_c(rc, "\0", "\0");
path = (char*)calloc(MAXPGPATH, sizeof(char));
(void)snprintf(attr_name, sizeof(attr_name), "C%d", attid);
if (rnode.spcNode == GLOBALTABLESPACE_OID) {
/* Shared system relations live in {datadir}/global */
Assert(rnode.dbNode == 0);
pathlen = strlen("global") + 1 + OIDCHARS + 1 + strlen(attr_name) + 1;
rc = snprintf_s(path, pathlen, pathlen - 1, "global/%u_%s", rnode.relNode, attr_name);
(void)snprintf(path, pathlen, "global/%u_%s", rnode.relNode, attr_name);
} else if (rnode.spcNode == DEFAULTTABLESPACE_OID) {
/* The default tablespace is {datadir}/base */
pathlen = strlen("base") + 1 + OIDCHARS + 1 + OIDCHARS + 1 + strlen(attr_name) + 1;
rc = snprintf_s(path, pathlen, pathlen - 1, "base/%u/%u_%s", rnode.dbNode, rnode.relNode, attr_name);
(void)snprintf(path, pathlen, "base/%u/%u_%s", rnode.dbNode, rnode.relNode, attr_name);
} else {
/* All other tablespaces are accessed via symlinks */
pathlen = 9 + 1 + OIDCHARS + 1 + strlen(TABLESPACE_VERSION_DIRECTORY) + 1 + strlen(PGXCNodeName) + 1 +
OIDCHARS + 1 + OIDCHARS + 1 + strlen(attr_name) + 1;
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s_%s/%u/%u_%s", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, PGXCNodeName, rnode.dbNode, rnode.relNode, attr_name);
OIDCHARS + 1 + OIDCHARS + 1 + strlen(attr_name) + 1;
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s_%s/%u/%u_%s",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
PGXCNodeName,
rnode.dbNode,
rnode.relNode,
attr_name);
}
} else {
if (rnode.spcNode == GLOBALTABLESPACE_OID) {
@ -182,85 +187,133 @@ char *relpathbackend(RelFileNode rnode, BackendId backend, ForkNumber forknum)
Assert(rnode.dbNode == 0);
Assert(backend == InvalidBackendId);
pathlen = 7 + OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char *)malloc(pathlen);
path = (char*)malloc(pathlen);
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "global/%u_%s", rnode.relNode, forkNames[forknum]);
(void)snprintf(path, pathlen, "global/%u_%s", rnode.relNode, forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "global/%u", rnode.relNode);
(void)snprintf(path, pathlen, "global/%u", rnode.relNode);
} else if (rnode.spcNode == DEFAULTTABLESPACE_OID) {
/* The default tablespace is {datadir}/base */
if (backend == InvalidBackendId) {
pathlen = 5 + OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char *)malloc(pathlen);
path = (char*)malloc(pathlen);
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "base/%u/%u_%s", rnode.dbNode, rnode.relNode,
forkNames[forknum]);
(void)snprintf(path, pathlen, "base/%u/%u_%s", rnode.dbNode, rnode.relNode, forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "base/%u/%u", rnode.dbNode, rnode.relNode);
(void)snprintf(path, pathlen, "base/%u/%u", rnode.dbNode, rnode.relNode);
} else {
/* OIDCHARS will suffice for an integer, too */
pathlen = 5 + OIDCHARS + 2 + OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char *)malloc(pathlen);
path = (char*)malloc(pathlen);
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "base/%u/t%d_%u_%s", rnode.dbNode, backend,
rnode.relNode, forkNames[forknum]);
(void)snprintf(
path, pathlen, "base/%u/t%d_%u_%s", rnode.dbNode, backend, rnode.relNode, forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "base/%u/t%d_%u", rnode.dbNode, backend,
rnode.relNode);
(void)snprintf(path, pathlen, "base/%u/t%d_%u", rnode.dbNode, backend, rnode.relNode);
}
} else {
/* All other tablespaces are accessed via symlinks */
if (backend == InvalidBackendId) {
pathlen = 9 + 1 + OIDCHARS + 1 + strlen(TABLESPACE_VERSION_DIRECTORY) + 1 + OIDCHARS +
1
1
#ifdef PGXC
/* Postgres-XC tablespaces include node name */
+ strlen(PGXCNodeName) + 1
/* Postgres-XC tablespaces include node name */
+ strlen(PGXCNodeName) + 1
#endif
+ OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char *)malloc(pathlen);
+ OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char*)malloc(pathlen);
#ifdef PGXC
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s_%s/%u/%u_%s", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, PGXCNodeName, rnode.dbNode, rnode.relNode, forkNames[forknum]);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s_%s/%u/%u_%s",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
PGXCNodeName,
rnode.dbNode,
rnode.relNode,
forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s_%s/%u/%u", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, PGXCNodeName, rnode.dbNode, rnode.relNode);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s_%s/%u/%u",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
PGXCNodeName,
rnode.dbNode,
rnode.relNode);
#else
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s/%u/%u_%s", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, rnode.dbNode, rnode.relNode, forkNames[forknum]);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s/%u/%u_%s",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
rnode.dbNode,
rnode.relNode,
forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s/%u/%u", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, rnode.dbNode, rnode.relNode);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s/%u/%u",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
rnode.dbNode,
rnode.relNode);
#endif
} else {
/* OIDCHARS will suffice for an integer, too */
pathlen = 9 + 1 + OIDCHARS + 1 + strlen(TABLESPACE_VERSION_DIRECTORY) + 1 + OIDCHARS + 2
#ifdef PGXC
+ strlen(PGXCNodeName) + 1
+ strlen(PGXCNodeName) + 1
#endif
+ OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char *)malloc(pathlen);
+ OIDCHARS + 1 + OIDCHARS + 1 + FORKNAMECHARS + 1;
path = (char*)malloc(pathlen);
#ifdef PGXC
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s_%s/%u/t%d_%u_%s", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, PGXCNodeName, rnode.dbNode, backend, rnode.relNode,
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s_%s/%u/t%d_%u_%s",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
PGXCNodeName,
rnode.dbNode,
backend,
rnode.relNode,
forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s_%s/%u/t%d_%u", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, PGXCNodeName, rnode.dbNode, backend, rnode.relNode);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s_%s/%u/t%d_%u",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
PGXCNodeName,
rnode.dbNode,
backend,
rnode.relNode);
#else
if (forknum != MAIN_FORKNUM)
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s/%u/t%d_%u_%s", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, rnode.dbNode, backend, rnode.relNode, forkNames[forknum]);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s/%u/t%d_%u_%s",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
rnode.dbNode,
backend,
rnode.relNode,
forkNames[forknum]);
else
rc = snprintf_s(path, pathlen, pathlen - 1, "pg_tblspc/%u/%s/%u/t%d_%u", rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY, rnode.dbNode, backend, rnode.relNode);
(void)snprintf(path,
pathlen,
"pg_tblspc/%u/%s/%u/t%d_%u",
rnode.spcNode,
TABLESPACE_VERSION_DIRECTORY,
rnode.dbNode,
backend,
rnode.relNode);
#endif
}
}
}
securec_check_ss_c(rc, "\0", "\0");
return path;
}

View File

@ -32,9 +32,6 @@
#include "replication/replicainternal.h"
#include "rmgrdesc.h"
#include "storage/smgr/segment.h"
#include "storage/page_compression.h"
#include "storage/dss/dss_adaptor.h"
#include "storage/file/fio_device.h"
static const char* progname;
@ -46,8 +43,6 @@ typedef struct XLogDumpPrivate {
bool endptr_reached;
char* shareStorageXlogFilePath;
long shareStorageXlogSize;
bool enable_dss;
char* socketpath;
} XLogDumpPrivate;
typedef struct XLogDumpConfig {
@ -81,7 +76,7 @@ typedef struct XLogDumpStats {
} XLogDumpStats;
static void XLogDumpTablePage(XLogReaderState* record, int block_id, RelFileNode rnode, BlockNumber blk);
static void XLogDumpXLogRead(char* directory, TimeLineID timeline_id, XLogRecPtr startptr, char* buf, Size count);
static void XLogDumpXLogRead(const char* directory, TimeLineID timeline_id, XLogRecPtr startptr, char* buf, Size count);
static int XLogDumpReadPage(XLogReaderState* state, XLogRecPtr targetPagePtr, int reqLen, XLogRecPtr targetPtr,
char* readBuff, TimeLineID* curFileTLI, char* xlog_path = NULL);
static void XLogDumpCountRecord(XLogDumpConfig* config, XLogDumpStats* stats, XLogReaderState* record);
@ -92,7 +87,6 @@ static void XLogDumpDisplayStats(XLogDumpConfig* config, XLogDumpStats* stats);
static void usage(void);
static int fuzzy_open_file(const char* directory, const char* fname);
static int open_dss_file(char* directory, const char* fname);
static void split_path(char* path, char** dir, char** fname);
static bool verify_directory(const char* directory);
static void print_rmgr_list(void);
@ -229,21 +223,6 @@ static int fuzzy_open_file(const char* directory, const char* fname)
return -1;
}
// for dss storage
static int open_dss_file(char* directory, const char* fname)
{
int fd = -1;
char fpath[MAXPGPATH];
/* directory / fname */
canonicalize_path(directory);
snprintf(fpath, MAXPGPATH, "%s/%s", directory, fname);
if (dss_open_file(fpath, O_RDONLY | PG_BINARY, 0, &fd) == GS_SUCCESS) {
return fd;
}
return -1;
}
/*
* write the full page to disk.
*/
@ -347,7 +326,7 @@ static void XLogDumpReadSharedStorage(char* directory, XLogRecPtr startptr, long
* given timeline, containing the specified record pointer; store the data in
* the passed buffer.
*/
static void XLogDumpXLogRead(char* directory, TimeLineID timeline_id, XLogRecPtr startptr, char* buf, Size count)
static void XLogDumpXLogRead(const char* directory, TimeLineID timeline_id, XLogRecPtr startptr, char* buf, Size count)
{
char* p = NULL;
XLogRecPtr recptr;
@ -379,11 +358,7 @@ static void XLogDumpXLogRead(char* directory, TimeLineID timeline_id, XLogRecPtr
XLogFileName(fname, MAXFNAMELEN, timeline_id, sendSegNo);
if (is_dss_file(directory)) {
sendFile = open_dss_file(directory, fname);
} else {
sendFile = fuzzy_open_file(directory, fname);
}
sendFile = fuzzy_open_file(directory, fname);
if (sendFile < 0)
fatal_error("could not find file \"%s\": %s", fname, strerror(errno));
@ -543,7 +518,6 @@ static void XLogDumpDisplayRecord(XLogDumpConfig* config, XLogReaderState* recor
int block_id;
XLogRecPtr lsn;
XLogRecPtr xl_prev = XLogRecGetPrev(record);
RelFileCompressOption compOpt;
printf("REDO @ %X/%X; LSN %X/%X: prev %X/%X; xid " XID_FMT "; term %u; len %u; total %u; crc %u; "
"desc: %s - ",
@ -581,15 +555,6 @@ static void XLogDumpDisplayRecord(XLogDumpConfig* config, XLogReaderState* recor
if (IsBucketFileNode(rnode)) {
printf("/%d", rnode.bucketNode);
}
if (rnode.opt != 0) {
TransCompressOptions(rnode, &compOpt);
printf(", compressed file: byteConvert: %u, diffConvert: %u, PreallocChunks: %u, compressLevel: %u"
", compressAlgorithm: %u, compressChunkSize: %u.",
compOpt.byteConvert, compOpt.diffConvert, compOpt.compressPreallocChunks,
compOpt.compressLevelSymbol, compOpt.compressAlgorithm, CHUNK_SIZE_LIST[compOpt.compressChunkSize]);
}
StorageType storage_type = HEAP_DISK;
if (IsSegmentFileNode(rnode)) {
storage_type = SEGMENT_PAGE;
@ -831,8 +796,6 @@ static void usage(void)
printf(" -z, --stats show statistics instead of records\n");
printf(" -v, --verbose show detailed information\n");
printf(" -?, --help show this help, then exit\n");
printf(" --enable-dss enable shared storage mode\n");
printf(" --socketpath=SOCKETPATH dss connect socket file path\n");
}
int main(int argc, char** argv)
@ -849,14 +812,12 @@ int main(int argc, char** argv)
static struct option long_options[] = {{"bkp-details", no_argument, NULL, 'b'},
{"end", required_argument, NULL, 'e'},
{"enable-dss", no_argument, NULL, 1},
{"follow", no_argument, NULL, 'f'},
{"help", no_argument, NULL, '?'},
{"limit", required_argument, NULL, 'n'},
{"path", required_argument, NULL, 'p'},
{"rmgr", required_argument, NULL, 'r'},
{"start", required_argument, NULL, 's'},
{"socketpath", required_argument, NULL, 2},
{"timeline", required_argument, NULL, 't'},
{"write-fpw", no_argument, NULL, 'w'},
{"xid", required_argument, NULL, 'x'},
@ -880,8 +841,6 @@ int main(int argc, char** argv)
dumpprivate.endptr = InvalidXLogRecPtr;
dumpprivate.endptr_reached = false;
dumpprivate.shareStorageXlogFilePath = NULL;
dumpprivate.enable_dss = false;
dumpprivate.socketpath = NULL;
const long defaultShareStorageXlogSize = 512 * 1024 * 1024 * 1024L;
dumpprivate.shareStorageXlogSize = defaultShareStorageXlogSize;
@ -989,13 +948,6 @@ int main(int argc, char** argv)
case 'z':
config.stats = true;
break;
case 1:
dumpprivate.enable_dss = true;
break;
case 2:
dumpprivate.enable_dss = true;
dumpprivate.socketpath = strdup(optarg);
break;
default:
goto bad_argument;
}
@ -1006,30 +958,6 @@ int main(int argc, char** argv)
goto bad_argument;
}
// dss device init
if (dss_device_init(dumpprivate.socketpath, dumpprivate.enable_dss) != DSS_SUCCESS) {
fatal_error("failed to init dss device");
}
if (dumpprivate.enable_dss) {
if (dumpprivate.socketpath == NULL) {
fprintf(stderr, "%s: socketpath cannot be NULL when enable dss\n", progname);
goto bad_argument;
}
char* directory = dumpprivate.inpath == NULL ? argv[optind] : dumpprivate.inpath;
if (directory != NULL) {
if (directory[0] != '+' || strstr(directory, "/") == NULL) {
fprintf(stderr, "%s: xlog file path should be absolutely when enable dss\n", progname);
goto bad_argument;
}
} else {
fprintf(stderr, "%s: xlog file path must be specified when enable dss\n", progname);
goto bad_argument;
}
}
if (dumpprivate.inpath != NULL) {
/* validate path points to directory */
if (!verify_directory(dumpprivate.inpath)) {
@ -1038,9 +966,6 @@ int main(int argc, char** argv)
}
}
if (dumpprivate.enable_dss)
XLogSegmentSize = DSS_XLOG_SEG_SIZE;
/* parse files as start/end boundaries, extract path if not specified */
if (optind < argc) {
char* directory = NULL;
@ -1062,12 +987,7 @@ int main(int argc, char** argv)
fatal_error("cannot open directory \"%s\": %s", dumpprivate.inpath, strerror(errno));
}
if (is_dss_file(dumpprivate.inpath)) {
fd = open_dss_file(dumpprivate.inpath, fname);
} else {
fd = fuzzy_open_file(dumpprivate.inpath, fname);
}
fd = fuzzy_open_file(dumpprivate.inpath, fname);
if (fd < 0)
fatal_error("could not open file \"%s\"", fname);
close(fd);
@ -1099,12 +1019,7 @@ int main(int argc, char** argv)
/* ignore directory, already have that */
split_path(argv[optind + 1], &directory, &fname);
if (is_dss_file(dumpprivate.inpath)) {
fd = open_dss_file(dumpprivate.inpath, fname);
} else {
fd = fuzzy_open_file(dumpprivate.inpath, fname);
}
fd = fuzzy_open_file(dumpprivate.inpath, fname);
if (fd < 0)
fatal_error("could not open file \"%s\"", fname);
close(fd);

View File

@ -36,7 +36,6 @@
#include "storage/buf/bufmgr.h"
#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/snapmgr.h"
PG_MODULE_MAGIC;
@ -196,7 +195,7 @@ static Datum pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
switch (rel->rd_rel->relkind) {
case RELKIND_RELATION:
case RELKIND_TOASTVALUE:
//case RELKIND_UNCATALOGED:
case RELKIND_UNCATALOGED:
case RELKIND_SEQUENCE:
case RELKIND_LARGE_SEQUENCE:
return pgstat_heap(rel, fcinfo);
@ -251,7 +250,7 @@ static Datum pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
*/
static Datum pgstat_heap(Relation rel, FunctionCallInfo fcinfo)
{
TableScanDesc scan;
HeapScanDesc scan;
HeapTuple tuple;
BlockNumber nblocks;
BlockNumber block = 0; /* next block to count free space in */

View File

@ -1,7 +1,7 @@
# contrib/postgres_fdw/Makefile
MODULE_big = postgres_fdw
OBJS = postgres_fdw.o option.o deparse.o connection.o internal_interface.o
OBJS = postgres_fdw.o option.o deparse.o connection.o
PG_CPPFLAGS = -I$(libpq_srcdir)
SHLIB_LINK_INTERNAL = $(libpq)

View File

@ -28,7 +28,7 @@
#include "utils/syscache.h"
#include "utils/timestamp.h"
#include "storage/ipc.h"
#include "executor/executor.h"
/*
* Connection cache hash table entry
@ -243,39 +243,6 @@ PGconn *GetConnection(ForeignServer *server, UserMapping *user, bool will_prep_s
return entry->conn;
}
PGconn* GetConnectionByFScanState(ForeignScanState* node, bool will_prep_stmt)
{
ForeignScan* fsplan = (ForeignScan *)node->ss.ps.plan;
EState* estate = node->ss.ps.state;
RangeTblEntry* rte = NULL;
Oid userid;
ForeignTable* table = NULL;
ForeignServer* server = NULL;
UserMapping* user = NULL;
int rtindex;
/*
* Identify which user to do the remote access as. This should match what
* ExecCheckRTEPerms() does. In case of a join or aggregate, use the
* lowest-numbered member RTE as a representative; we would get the same
* result from any.
*/
if (fsplan->scan.scanrelid > 0) {
rtindex = fsplan->scan.scanrelid;
} else {
rtindex = bms_next_member(fsplan->fs_relids, -1);
}
rte = exec_rt_fetch(rtindex, estate);
userid = rte->checkAsUser ? rte->checkAsUser : GetUserId();
/* Get info about foreign table. */
table = GetForeignTable(rte->relid);
server = GetForeignServer(table->serverid);
user = GetUserMapping(userid, table->serverid);
return GetConnection(server, user, will_prep_stmt);
}
/*
* Connect to remote server using specified server and user mapping properties.
*/
@ -795,16 +762,6 @@ static void pgfdw_xact_callback(XactEvent event, void *arg)
return;
}
#ifdef ENABLE_MOT
/*
* These events are added only for MOT FDW. So, others can safely ignore these event.
*/
if (event == XACT_EVENT_START || event == XACT_EVENT_RECORD_COMMIT || event == XACT_EVENT_PREROLLBACK_CLEANUP ||
event == XACT_EVENT_POST_COMMIT_CLEANUP || event == XACT_EVENT_STMT_FINISH) {
return;
}
#endif
/*
* Scan all connection cache entries to find open remote transactions, and
* close them.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,665 +0,0 @@
/* -------------------------------------------------------------------------
*
* postgres_fdw.c
* Foreign-data wrapper for remote openGauss servers
*
* Portions Copyright (c) 2020 Huawei Technologies Co.,Ltd.
* Portions Copyright (c) 2012-2014, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/postgres_fdw/postgres_fdw.c
*
* -------------------------------------------------------------------------
*/
#ifndef FRONTEND
#include "postgres.h"
#include "utils/memutils.h"
#else
#include "postgres_fe.h"
/* It's possible we could use a different value for this in frontend code */
#define MaxAllocSize ((Size)0x3fffffff) /* 1 gigabyte - 1 */
#endif
#include "internal_interface.h"
#include "optimizer/pathnode.h"
#include "optimizer/cost.h"
#include "optimizer/planmain.h"
/*
* Get a copy of an existing local path for a given join relation.
*
* This function is usually helpful to obtain an alternate local path for EPQ
* checks.
*
* Right now, this function only supports unparameterized foreign joins, so we
* only search for unparameterized path in the given list of paths. Since we
* are searching for a path which can be used to construct an alternative local
* plan for a foreign join, we look for only MergeJoin, HashJoin or NestLoop
* paths.
*
* If the inner or outer subpath of the chosen path is a ForeignScan, we
* replace it with its outer subpath. For this reason, and also because the
* planner might free the original path later, the path returned by this
* function is a shallow copy of the original. There's no need to copy
* the substructure, so we don't.
*
* Since the plan created using this path will presumably only be used to
* execute EPQ checks, efficiency of the path is not a concern. But since the
* path list in RelOptInfo is anyway sorted by total cost we are likely to
* choose the most efficient path, which is all for the best.
*/
Path *GetExistingLocalJoinPath(RelOptInfo *joinrel)
{
ListCell *lc = NULL;
errno_t rc;
Assert(IS_JOIN_REL(joinrel));
foreach (lc, joinrel->pathlist) {
Path *path = (Path *)lfirst(lc);
JoinPath *joinpath = NULL;
/* Skip parameterized paths. */
if (path->param_info != NULL) {
continue;
}
switch (path->pathtype) {
case T_HashJoin: {
HashPath *hash_path = makeNode(HashPath);
rc = memcpy_s(hash_path, sizeof(HashPath), path, sizeof(HashPath));
securec_check(rc, "\0", "\0");
joinpath = (JoinPath *)hash_path;
} break;
case T_NestLoop: {
NestPath *nest_path = makeNode(NestPath);
rc = memcpy_s(nest_path, sizeof(NestPath), path, sizeof(NestPath));
securec_check(rc, "\0", "\0");
joinpath = (JoinPath *)nest_path;
} break;
case T_MergeJoin: {
MergePath *merge_path = makeNode(MergePath);
rc = memcpy_s(merge_path, sizeof(MergePath), path, sizeof(MergePath));
securec_check(rc, "\0", "\0");
joinpath = (JoinPath *)merge_path;
} break;
default:
/*
* Just skip anything else. We don't know if corresponding
* plan would build the output row from whole-row references
* of base relations and execute the EPQ checks.
*/
break;
}
/* This path isn't good for us, check next. */
if (!joinpath) {
continue;
}
/*
* If either inner or outer path is a ForeignPath corresponding to a
* pushed down join, replace it with the fdw_outerpath, so that we
* maintain path for EPQ checks built entirely of local join
* strategies.
*/
if (IsA(joinpath->outerjoinpath, ForeignPath)) {
ForeignPath *foreign_path;
foreign_path = (ForeignPath *)joinpath->outerjoinpath;
if (IS_JOIN_REL(foreign_path->path.parent)) {
joinpath->outerjoinpath = foreign_path->fdw_outerpath;
}
}
if (IsA(joinpath->innerjoinpath, ForeignPath)) {
ForeignPath *foreign_path;
foreign_path = (ForeignPath *)joinpath->innerjoinpath;
if (IS_JOIN_REL(foreign_path->path.parent)) {
joinpath->innerjoinpath = foreign_path->fdw_outerpath;
}
}
return (Path *)joinpath;
}
return NULL;
}
/*
* psprintf
*
* Format text data under the control of fmt (an sprintf-style format string)
* and return it in an allocated-on-demand buffer. The buffer is allocated
* with palloc in the backend, or malloc in frontend builds. Caller is
* responsible to free the buffer when no longer needed, if appropriate.
*
* Errors are not returned to the caller, but are reported via elog(ERROR)
* in the backend, or printf-to-stderr-and-exit() in frontend builds.
* One should therefore think twice about using this in libpq.
*/
char *psprintf(const char *fmt, ...)
{
int save_errno = errno;
size_t len = 128; /* initial assumption about buffer size */
for (;;) {
char *result = NULL;
va_list args;
size_t newlen;
/*
* Allocate result buffer. Note that in frontend this maps to malloc
* with exit-on-error.
*/
result = (char *)palloc(len);
/* Try to format the data. */
errno = save_errno;
va_start(args, fmt);
newlen = pvsnprintf(result, len, fmt, args);
va_end(args);
if (newlen < len) {
return result; /* success */
}
/* Release buffer and loop around to try again with larger len. */
pfree(result);
len = newlen;
}
}
/*
* pvsnprintf
*
* Attempt to format text data under the control of fmt (an sprintf-style
* format string) and insert it into buf (which has length len).
*
* If successful, return the number of bytes emitted, not counting the
* trailing zero byte. This will always be strictly less than len.
*
* If there's not enough space in buf, return an estimate of the buffer size
* needed to succeed (this *must* be more than the given len, else callers
* might loop infinitely).
*
* Other error cases do not return, but exit via elog(ERROR) or exit().
* Hence, this shouldn't be used inside libpq.
*
* Caution: callers must be sure to preserve their entry-time errno
* when looping, in case the fmt contains "%m".
*
* Note that the semantics of the return value are not exactly C99's.
* First, we don't promise that the estimated buffer size is exactly right;
* callers must be prepared to loop multiple times to get the right size.
* (Given a C99-compliant vsnprintf, that won't happen, but it is rumored
* that some implementations don't always return the same value ...)
* Second, we return the recommended buffer size, not one less than that;
* this lets overflow concerns be handled here rather than in the callers.
*/
size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
{
int nprinted = 0;
nprinted = vsnprintf_s(buf, len, len, fmt, args);
securec_check_ss(nprinted, "\0", "\0");
/* We assume failure means the fmt is bogus, hence hard failure is OK */
if (unlikely(nprinted < 0)) {
#ifndef FRONTEND
elog(ERROR, "vsnprintf failed: %m with format string \"%s\"", fmt);
#else
fprintf(stderr, "vsnprintf failed: %s with format string \"%s\"\n", strerror(errno), fmt);
exit(EXIT_FAILURE);
#endif
}
if ((size_t)nprinted < len) {
/* Success. Note nprinted does not include trailing null. */
return (size_t)nprinted;
}
/*
* We assume a C99-compliant vsnprintf, so believe its estimate of the
* required space, and add one for the trailing null. (If it's wrong, the
* logic will still work, but we may loop multiple times.)
*
* Choke if the required space would exceed MaxAllocSize. Note we use
* this palloc-oriented overflow limit even when in frontend.
*/
if (unlikely((size_t)nprinted > MaxAllocSize - 1)) {
#ifndef FRONTEND
ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("out of memory")));
#else
fprintf(stderr, _("out of memory\n"));
exit(EXIT_FAILURE);
#endif
}
return nprinted + 1;
}
/*
* create_foreign_join_path
* Creates a path corresponding to a scan of a foreign join,
* returning the pathnode.
*
* This function is never called from core Postgres; rather, it's expected
* to be called by the GetForeignJoinPaths function of a foreign data wrapper.
* We make the FDW supply all fields of the path, since we do not have any way
* to calculate them in core. However, there is a usually-sane default for
* the pathtarget (rel->reltarget), so we let a NULL for "target" select that.
*/
ForeignPath *create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel, List *target, double rows,
Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer, Path *fdw_outerpath, List *fdw_private)
{
ForeignPath *pathnode = makeNode(ForeignPath);
/*
* We should use get_joinrel_parampathinfo to handle parameterized paths,
* but the API of this function doesn't support it, and existing
* extensions aren't yet trying to build such paths anyway. For the
* moment just throw an error if someone tries it; eventually we should
* revisit this.
*/
if (!bms_is_empty(required_outer) || !bms_is_empty(rel->lateral_relids)) {
elog(ERROR, "parameterized foreign joins are not supported yet");
}
pathnode->path.pathtype = T_ForeignScan;
pathnode->path.parent = rel;
pathnode->path.pathtarget = rel->reltarget;
pathnode->path.param_info = NULL; /* XXX see above */
pathnode->path.rows = rows;
pathnode->path.startup_cost = startup_cost;
pathnode->path.total_cost = total_cost;
pathnode->path.pathkeys = pathkeys;
pathnode->path.dop = 1;
pathnode->fdw_outerpath = fdw_outerpath;
pathnode->fdw_private = fdw_private;
return pathnode;
}
/*
* Call ExecInitExpr() on a list of expressions, return a list of ExprStates.
*/
List *ExecInitExprList(List *nodes, PlanState *parent)
{
List *result = NIL;
ListCell *lc = NULL;
foreach (lc, nodes) {
Expr *e = (Expr *)lfirst(lc);
result = lappend(result, ExecInitExpr(e, parent));
}
return result;
}
/*
* get_namespace_name_or_temp
* As above, but if it is this backend's temporary namespace, return
* "pg_temp" instead.
*/
char *get_namespace_name_or_temp(Oid nspid)
{
if (isTempNamespace(nspid)) {
return pstrdup("pg_temp");
} else {
return get_namespace_name(nspid);
}
}
/*
* fetch_upper_rel
* Build a RelOptInfo describing some post-scan/join query processing,
* or return a pre-existing one if somebody already built it.
*
* An "upper" relation is identified by an UpperRelationKind and a Relids set.
* The meaning of the Relids set is not specified here, and very likely will
* vary for different relation kinds.
*
* Most of the fields in an upper-level RelOptInfo are not used and are not
* set here (though makeNode should ensure they're zeroes). We basically only
* care about fields that are of interest to add_path() and set_cheapest().
*/
RelOptInfo *fetch_upper_rel(FDWUpperRelCxt *ufdwCxt, UpperRelationKind kind)
{
/*
* For the moment, our indexing data structure is just a List for each
* relation kind. If we ever get so many of one kind that this stops
* working well, we can improve it. No code outside this function should
* assume anything about how to find a particular upperrel.
*/
if (ufdwCxt->upperRels[kind] != NULL) {
return ufdwCxt->upperRels[kind];
}
RelOptInfo *upperrel = makeNode(RelOptInfo);
upperrel->reloptkind = RELOPT_UPPER_REL;
upperrel->relids = NULL;
upperrel->reltarget = makeNode(PathTarget);
upperrel->pathlist = NIL;
upperrel->cheapest_startup_path = NULL;
upperrel->cheapest_total_path = NULL;
upperrel->cheapest_unique_path = NULL;
upperrel->cheapest_parameterized_paths = NIL;
ufdwCxt->upperRels[kind] = upperrel;
return upperrel;
}
List* extract_target_from_tel(FDWUpperRelCxt *ufdw_cxt, PgFdwRelationInfo *fpinfo)
{
List* tel = NIL;
switch (fpinfo->stage) {
case UPPERREL_INIT:
tel = ufdw_cxt->spjExtra->targetList;
break;
case UPPERREL_GROUP_AGG:
tel = ufdw_cxt->groupExtra->targetList;
break;
case UPPERREL_ORDERED:
tel = ufdw_cxt->orderExtra->targetList;
break;
case UPPERREL_FINAL:
tel = ufdw_cxt->finalExtra->targetList;
break;
default:
Assert(false);
break;
}
fpinfo->complete_tlist = tel;
List* tl = NULL;
ListCell* lc = NULL;
foreach(lc, tel) {
Assert(IsA(lfirst(lc), TargetEntry));
TargetEntry* te = (TargetEntry*)lfirst(lc);
tl = lappend(tl, copyObject(te->expr));
}
return tl;
}
/*
* make_upper_rel
*
* Create a new grouping rel and set basic properties.
*
* input_rel represents the underlying scan/join relation.
* target is the output expected from the grouping relation.
*/
RelOptInfo *make_upper_rel(FDWUpperRelCxt *ufdwCxt, PgFdwRelationInfo *fpinfo)
{
RelOptInfo *upper_rel = fetch_upper_rel(ufdwCxt, fpinfo->stage);
/* Set target. */
upper_rel->reltarget->exprs = extract_target_from_tel(ufdwCxt, fpinfo);
/*
* If the input rel belongs to a single FDW, so does the grouped rel.
*/
upper_rel->serverid = ufdwCxt->currentRel->serverid;
upper_rel->userid = ufdwCxt->currentRel->userid;
upper_rel->useridiscurrent = ufdwCxt->currentRel->useridiscurrent;
upper_rel->fdwroutine = ufdwCxt->currentRel->fdwroutine;
upper_rel->fdw_private = fpinfo;
return upper_rel;
}
/*
* get_sortgroupref_clause_noerr
* As above, but return NULL rather than throwing an error if not found.
*/
SortGroupClause *get_sortgroupref_clause_noerr(Index sortref, List *clauses)
{
ListCell *l = NULL;
foreach (l, clauses) {
SortGroupClause *cl = (SortGroupClause *)lfirst(l);
if (cl->tleSortGroupRef == sortref) {
return cl;
}
}
return NULL;
}
/*
* create_foreign_upper_path
* Creates a path corresponding to an upper relation that's computed
* directly by an FDW, returning the pathnode.
*
* This function is never called from core Postgres; rather, it's expected to
* be called by the GetForeignUpperPaths function of a foreign data wrapper.
* We make the FDW supply all fields of the path, since we do not have any way
* to calculate them in core. However, there is a usually-sane default for
* the pathtarget (rel->reltarget), so we let a NULL for "target" select that.
*/
ForeignPath *create_foreign_upper_path(PlannerInfo *root, RelOptInfo *rel, List *target, double rows,
Cost startup_cost, Cost total_cost, List *pathkeys, Path *fdw_outerpath, List *fdw_private)
{
ForeignPath *pathnode = makeNode(ForeignPath);
/*
* Upper relations should never have any lateral references, since joining
* is complete.
*/
Assert(bms_is_empty(rel->lateral_relids));
pathnode->path.pathtype = T_ForeignScan;
pathnode->path.parent = rel;
pathnode->path.pathtarget = rel->reltarget;
pathnode->path.param_info = NULL;
pathnode->path.rows = rows;
pathnode->path.startup_cost = startup_cost;
pathnode->path.total_cost = total_cost;
pathnode->path.pathkeys = pathkeys;
pathnode->path.dop = 1;
pathnode->fdw_outerpath = fdw_outerpath;
pathnode->fdw_private = fdw_private;
return pathnode;
}
/*
* adjust_limit_rows_costs
* Adjust the size and cost estimates for a LimitPath node according to the
* offset/limit.
*
* This is only a cosmetic issue if we are at top level, but if we are
* building a subquery then it's important to report correct info to the outer
* planner.
*
* When the offset or count couldn't be estimated, use 10% of the estimated
* number of rows emitted from the subpath.
*
* XXX we don't bother to add eval costs of the offset/limit expressions
* themselves to the path costs. In theory we should, but in most cases those
* expressions are trivial and it's just not worth the trouble.
*/
void adjust_limit_rows_costs(double *rows, /* in/out parameter */
Cost *startup_cost, /* in/out parameter */
Cost *total_cost, /* in/out parameter */
int64 offset_est, int64 count_est)
{
double input_rows = *rows;
Cost input_startup_cost = *startup_cost;
Cost input_total_cost = *total_cost;
if (offset_est != 0) {
double offset_rows;
if (offset_est > 0) {
offset_rows = (double)offset_est;
} else {
offset_rows = clamp_row_est(input_rows * 0.10);
}
if (offset_rows > *rows) {
offset_rows = *rows;
}
if (input_rows > 0) {
*startup_cost += (input_total_cost - input_startup_cost) * offset_rows / input_rows;
}
*rows -= offset_rows;
if (*rows < 1) {
*rows = 1;
}
}
if (count_est != 0) {
double count_rows;
if (count_est > 0) {
count_rows = (double)count_est;
} else {
count_rows = clamp_row_est(input_rows * 0.10);
}
if (count_rows > *rows) {
count_rows = *rows;
}
if (input_rows > 0) {
*total_cost = *startup_cost + (input_total_cost - input_startup_cost) * count_rows / input_rows;
}
*rows = count_rows;
if (*rows < 1) {
*rows = 1;
}
}
}
/*
* tlist_same_exprs
* Check whether two target lists contain the same expressions
*
* Note: this function is used to decide whether it's safe to jam a new tlist
* into a non-projection-capable plan node. Obviously we can't do that unless
* the node's tlist shows it already returns the column values we want.
* However, we can ignore the TargetEntry attributes resname, ressortgroupref,
* resorigtbl, resorigcol, and resjunk, because those are only labelings that
* don't affect the row values computed by the node. (Moreover, if we didn't
* ignore them, we'd frequently fail to make the desired optimization, since
* the planner tends to not bother to make resname etc. valid in intermediate
* plan nodes.) Note that on success, the caller must still jam the desired
* tlist into the plan node, else it won't have the desired labeling fields.
*/
static bool tlist_same_exprs(List *tlist1, List *tlist2)
{
ListCell *lc1 = NULL;
ListCell *lc2 = NULL;
if (list_length(tlist1) != list_length(tlist2)) {
return false; /* not same length, so can't match */
}
forboth(lc1, tlist1, lc2, tlist2) {
TargetEntry *tle1 = (TargetEntry *)lfirst(lc1);
TargetEntry *tle2 = (TargetEntry *)lfirst(lc2);
if (!equal(tle1->expr, tle2->expr)) {
return false;
}
}
return true;
}
/*
* inject_projection_plan
* Insert a Result node to do a projection step.
*
* This is used in a few places where we decide on-the-fly that we need a
* projection step as part of the tree generated for some Path node.
* We should try to get rid of this in favor of doing it more honestly.
*
* One reason it's ugly is we have to be told the right parallel_safe marking
* to apply (since the tlist might be unsafe even if the child plan is safe).
*/
static Plan *inject_projection_plan(PlannerInfo *root, Plan *subplan, List *tlist)
{
Plan *plan = NULL;
plan = (Plan *)make_result(root, tlist, NULL, subplan);
/*
* In principle, we should charge tlist eval cost plus cpu_per_tuple per
* row for the Result node. But the former has probably been factored in
* already and the latter was not accounted for during Path construction,
* so being formally correct might just make the EXPLAIN output look less
* consistent not more so. Hence, just copy the subplan's cost.
*/
copy_plan_costsize(plan, subplan);
return plan;
}
/*
* change_plan_targetlist
* Externally available wrapper for inject_projection_plan.
*
* This is meant for use by FDW plan-generation functions, which might
* want to adjust the tlist computed by some subplan tree. In general,
* a Result node is needed to compute the new tlist, but we can optimize
* some cases.
*
* In most cases, tlist_parallel_safe can just be passed as the parallel_safe
* flag of the FDW's own Path node.
*/
Plan *change_plan_targetlist(PlannerInfo *root, Plan *subplan, List *tlist)
{
/*
* If the top plan node can't do projections and its existing target list
* isn't already what we need, we need to add a Result node to help it
* along.
*/
if (!is_projection_capable_plan(subplan) && !tlist_same_exprs(tlist, subplan->targetlist)) {
subplan = inject_projection_plan(root, subplan, tlist);
} else {
/* Else we can just replace the plan node's tlist */
subplan->targetlist = tlist;
}
return subplan;
}
/*
* apply_tlist_labeling
* Apply the TargetEntry labeling attributes of src_tlist to dest_tlist
*
* This is useful for reattaching column names etc to a plan's final output
* targetlist.
*/
void apply_tlist_labeling(List *dest_tlist, List *src_tlist)
{
ListCell *ld = NULL;
ListCell *ls = NULL;
Assert(list_length(dest_tlist) == list_length(src_tlist));
forboth(ld, dest_tlist, ls, src_tlist)
{
TargetEntry *dest_tle = (TargetEntry *)lfirst(ld);
TargetEntry *src_tle = (TargetEntry *)lfirst(ls);
Assert(dest_tle->resno == src_tle->resno);
dest_tle->resname = src_tle->resname;
dest_tle->ressortgroupref = src_tle->ressortgroupref;
dest_tle->resorigtbl = src_tle->resorigtbl;
dest_tle->resorigcol = src_tle->resorigcol;
dest_tle->resjunk = src_tle->resjunk;
}
}

View File

@ -1,68 +0,0 @@
/* -------------------------------------------------------------------------
*
* postgres_fdw.c
* Foreign-data wrapper for remote openGauss servers
*
* Portions Copyright (c) 2020 Huawei Technologies Co.,Ltd.
* Portions Copyright (c) 2012-2014, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/postgres_fdw/postgres_fdw.c
*
* -------------------------------------------------------------------------
*/
#ifndef _PGFDW_INTERNAL_INTERFACE_H_
#define _PGFDW_INTERNAL_INTERFACE_H_
#include "c.h"
#include "datatypes.h"
#include "nodes/bitmapset.h"
#include "nodes/relation.h"
#include "nodes/nodes.h"
#include "nodes/execnodes.h"
#include "executor/executor.h"
#include "utils/lsyscache.h"
#include "postgres_fdw.h"
/*
* This macro embodies the correct way to test whether a RestrictInfo is
* "pushed down" to a given outer join, that is, should be treated as a filter
* clause rather than a join clause at that outer join. This is certainly so
* if is_pushed_down is true; but examining that is not sufficient anymore,
* because outer-join clauses will get pushed down to lower outer joins when
* we generate a path for the lower outer join that is parameterized by the
* LHS of the upper one. We can detect such a clause by noting that its
* required_relids exceed the scope of the join.
*/
#define RINFO_IS_PUSHED_DOWN(rinfo, joinrelids) \
((rinfo)->is_pushed_down || !bms_is_subset((rinfo)->required_relids, joinrelids))
extern char *psprintf(const char *fmt, ...);
extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args);
extern Path *GetExistingLocalJoinPath(RelOptInfo *joinrel);
extern ForeignPath *create_foreign_join_path(PlannerInfo *root, RelOptInfo *rel, List *target, double rows,
Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer, Path *fdw_outerpath, List *fdw_private);
ForeignPath *create_foreign_upper_path(PlannerInfo *root, RelOptInfo *rel, List *target, double rows,
Cost startup_cost, Cost total_cost, List *pathkeys, Path *fdw_outerpath, List *fdw_private);
extern List *ExecInitExprList(List *nodes, PlanState *parent);
extern char *get_namespace_name_or_temp(Oid nspid);
extern RelOptInfo *fetch_upper_rel(FDWUpperRelCxt *ufdwCxt, UpperRelationKind kind);
extern RelOptInfo *make_upper_rel(FDWUpperRelCxt *ufdwCxt, PgFdwRelationInfo *fpinfo);
extern void adjust_limit_rows_costs(double *rows, Cost *startup_cost, Cost *total_cost, int64 offset_est, int64 count_est);
extern Plan *change_plan_targetlist(PlannerInfo *root, Plan *subplan, List *tlist);
extern void apply_tlist_labeling(List *dest_tlist, List *src_tlist);
extern List* extract_target_from_tel(FDWUpperRelCxt *ufdw_cxt, PgFdwRelationInfo *fpinfo);
#define boolVal(v) ((bool)(((Value*)(v))->val.ival))
extern SortGroupClause *get_sortgroupref_clause_noerr(Index sortref, List *clauses);
/* Control flags for format_type_extended */
#define FORMAT_TYPE_TYPEMOD_GIVEN 0x01 /* typemod defined by caller */
#define FORMAT_TYPE_ALLOW_INVALID 0x02 /* allow invalid types */
#define FORMAT_TYPE_FORCE_QUALIFY 0x04 /* force qualification of type */
#define FORMAT_TYPE_INVALID_AS_NULL 0x08 /* NULL if undefined */
#endif

File diff suppressed because it is too large Load Diff

View File

@ -18,123 +18,15 @@
#include "lib/stringinfo.h"
#include "nodes/relation.h"
#include "utils/rel.h"
#include "libpq/libpq-fe.h"
#include "nodes/execnodes.h"
#include "utils/relcache.h"
/*
* FDW-specific planner information kept in RelOptInfo.fdw_private for a
* postgres_fdw foreign table. For a baserel, this struct is created by
* postgresGetForeignRelSize, although some fields are not filled till later.
* postgresGetForeignJoinPaths creates it for a joinrel, and
* postgresGetForeignUpperPaths creates it for an upperrel.
*/
typedef struct PgFdwRelationInfo {
/*
* True means that the relation can be pushed down. Always true for simple
* foreign scan.
*/
bool pushdown_safe;
/*
* Restriction clauses, divided into safe and unsafe to pushdown subsets.
* All entries in these lists should have RestrictInfo wrappers; that
* improves efficiency of selectivity and cost estimation.
*/
List *remote_conds;
List *local_conds;
/* Actual remote restriction clauses for scan (sans RestrictInfos) */
List *final_remote_exprs;
/* Bitmap of attr numbers we need to fetch from the remote server. */
Bitmapset *attrs_used;
/* True means that the query_pathkeys is safe to push down */
bool qp_is_pushdown_safe;
/* Cost and selectivity of local_conds. */
QualCost local_conds_cost;
Selectivity local_conds_sel;
/* Selectivity of join conditions */
Selectivity joinclause_sel;
/* Estimated size and cost for a scan with baserestrictinfo quals. */
double rows;
int width;
Cost startup_cost;
Cost total_cost;
/*
* Estimated number of rows fetched from the foreign server, and costs
* excluding costs for transferring those rows from the foreign server.
* These are only used by estimate_path_cost_size().
*/
double retrieved_rows;
Cost rel_startup_cost;
Cost rel_total_cost;
/* Options extracted from catalogs. */
bool use_remote_estimate;
Cost fdw_startup_cost;
Cost fdw_tuple_cost;
List *shippable_extensions; /* OIDs of shippable extensions */
bool async_capable;
/* Cached catalog information. */
ForeignTable *table;
ForeignServer *server;
UserMapping *user; /* only set in use_remote_estimate mode */
int fetch_size; /* fetch size for this remote table */
/*
* Name of the relation, for use while EXPLAINing ForeignScan. It is used
* for join and upper relations but is set for all relations. For a base
* relation, this is really just the RT index as a string; we convert that
* while producing EXPLAIN output. For join and upper relations, the name
* indicates which base foreign tables are included and the join type or
* aggregation type used.
*/
char *relation_name;
/* Join information */
RelOptInfo *outerrel;
RelOptInfo *innerrel;
JoinType jointype;
/* joinclauses contains only JOIN/ON conditions for an outer join */
List *joinclauses; /* List of RestrictInfo */
/* Upper relation information */
UpperRelationKind stage;
/* Grouping information */
List *grouped_tlist;
/* Subquery information */
bool make_outerrel_subquery; /* do we deparse outerrel as a subquery? */
bool make_innerrel_subquery; /* do we deparse innerrel as a subquery? */
Relids lower_subquery_rels; /* all relids appearing in lower subqueries */
/*
* Index of the relation. It is used to create an alias to a subquery
* representing the relation.
*/
int relation_index;
/* target entry list from */
List* complete_tlist;
} PgFdwRelationInfo;
/* in postgres_fdw.c */
extern int set_transmission_modes(void);
extern void reset_transmission_modes(int nestlevel);
/* in connection.c */
extern PGconn *GetConnection(ForeignServer *server, UserMapping *user, bool will_prep_stmt);
PGconn* GetConnectionByFScanState(ForeignScanState *node, bool will_prep_stmt);
extern void ReleaseConnection(PGconn *conn);
extern unsigned int GetCursorNumber(PGconn *conn);
extern unsigned int GetPrepStmtNumber(PGconn *conn);
@ -149,26 +41,18 @@ extern int ExtractConnectionOptions(List *defelems, const char **keywords, const
extern void classifyConditions(PlannerInfo *root, RelOptInfo *baserel, List *input_conds, List **remote_conds,
List **local_conds);
extern bool is_foreign_expr(PlannerInfo *root, RelOptInfo *baserel, Expr *expr);
extern bool is_foreign_pathkey(PlannerInfo *root, RelOptInfo *baserel, PathKey *pathkey);
extern void deparseSelectSql(StringInfo buf, PlannerInfo *root, RelOptInfo *baserel, Bitmapset *attrs_used,
List **retrieved_attrs);
extern void appendWhereClause(StringInfo buf, PlannerInfo *root, RelOptInfo *baserel, List *exprs, bool is_first,
List **params);
extern void deparseInsertSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs,
List *withCheckOptionList, List *returningList, List **retrieved_attrs);
List *returningList, List **retrieved_attrs);
extern void deparseUpdateSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *targetAttrs,
List *withCheckOptionList, List *returningList, List **retrieved_attrs);
List *returningList, List **retrieved_attrs);
extern void deparseDeleteSql(StringInfo buf, RangeTblEntry *rte, Index rtindex, Relation rel, List *returningList,
List **retrieved_attrs);
extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel);
extern void deparseAnalyzeSql(StringInfo buf, Relation rel, List **retrieved_attrs);
extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel, List *tlist,
List *remote_conds, List *pathkeys, bool has_final_sort, bool has_limit, bool is_subquery, List **retrieved_attrs,
List **params_list);
extern const char *get_jointype_name(JoinType jointype);
extern List *build_tlist_to_deparse(RelOptInfo *foreignrel);
extern bool is_foreign_param(PlannerInfo *root, RelOptInfo *baserel, Expr *expr);
extern EquivalenceMember *find_em_for_rel(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel);
extern EquivalenceMember *find_em_for_rel_target(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel);
extern bool is_builtin(Oid oid);
#endif /* POSTGRES_FDW_H */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -97,6 +97,7 @@ PG_MODULE_MAGIC;
extern "C" void _PG_init(void);
extern "C" void _PG_fini(void);
extern "C" void set_gsaudit_prehook(ProcessUtility_hook_type func);
#define POLICY_STR_BUFF_LEN 512
#define POLICY_TMP_BUFF_LEN 256
@ -699,14 +700,7 @@ static inline bool get_prepare_command_object_name(Node *parsetree, RangeVar *&r
}
case T_UpdateStmt: {
UpdateStmt *_stmt = (UpdateStmt *)parsetree;
ListCell *l = NULL;
foreach (l, _stmt->relationClause) {
Node *n = (Node *)lfirst(l);
if (IsA(n, RangeVar)) {
rel = (RangeVar *)n;
return true;
}
}
rel = _stmt->relation;
return true;
}
case T_SelectStmt: {
@ -727,7 +721,7 @@ static inline bool get_prepare_command_object_name(Node *parsetree, RangeVar *&r
}
case T_DeleteStmt: {
DeleteStmt *_stmt = (DeleteStmt *)parsetree;
rel = (RangeVar*)linitial(_stmt->relations);
rel = _stmt->relation;
return true;
}
default:
@ -805,19 +799,19 @@ static void light_unified_audit_executor(const Query *query)
access_audit_policy_run(query->rtable, query->commandType);
}
static void gsaudit_ProcessUtility_hook(processutility_context* processutility_cxt,
DestReceiver *dest, bool sentToRemote, char *completionTag, ProcessUtilityContext context,bool isCTAS = false)
static void gsaudit_ProcessUtility_hook(Node *parsetree, const char *queryString, ParamListInfoData *params,
bool isTopLevel, DestReceiver *dest, bool sentToRemote, char *completionTag, bool isCTAS = false)
{
/* do nothing when enable_security_policy is off */
if (!u_sess->attr.attr_security.Enable_Security_Policy || !IsConnFromApp() ||
u_sess->proc_cxt.IsInnerMaintenanceTools || IsConnFromCoord() ||
!is_audit_policy_exist_load_policy_info()) {
if (next_ProcessUtility_hook) {
next_ProcessUtility_hook(processutility_cxt, dest, sentToRemote, completionTag,
context, false);
next_ProcessUtility_hook(parsetree, queryString, params, isTopLevel, dest, sentToRemote, completionTag,
false);
} else {
standard_ProcessUtility(processutility_cxt, dest, sentToRemote, completionTag,
context, false);
standard_ProcessUtility(parsetree, queryString, params, isTopLevel, dest, sentToRemote, completionTag,
false);
}
return;
}
@ -831,7 +825,6 @@ static void gsaudit_ProcessUtility_hook(processutility_context* processutility_c
checkSecurityPolicyFilter_hook(filter_item, &security_policy_ids);
}
RenameMap renamed_objects;
Node* parsetree = processutility_cxt->parse_tree;
if (parsetree != NULL) {
switch (nodeTag(parsetree)) {
case T_PlannedStmt: {
@ -1610,11 +1603,11 @@ static void gsaudit_ProcessUtility_hook(processutility_context* processutility_c
PG_TRY();
{
if (next_ProcessUtility_hook) {
next_ProcessUtility_hook(processutility_cxt, dest, sentToRemote, completionTag,
context, false);
next_ProcessUtility_hook(parsetree, queryString, params, isTopLevel, dest, sentToRemote, completionTag,
false);
} else {
standard_ProcessUtility(processutility_cxt, dest, sentToRemote, completionTag,
context, false);
standard_ProcessUtility(parsetree, queryString, params, isTopLevel, dest, sentToRemote, completionTag,
false);
}
flush_access_logs(AUDIT_OK);
send_mng_events(AUDIT_OK);
@ -1777,7 +1770,7 @@ void install_audit_hook()
* preserve the chains.
*/
next_ExecutorStart_hook = ExecutorStart_hook;
next_ProcessUtility_hook = ProcessUtility_hook;
set_gsaudit_prehook(ProcessUtility_hook);
/*
* Install audit hooks, the interface for GaussDB kernel user as below
@ -1817,6 +1810,15 @@ void install_label_hook()
}
}
/*
* This function is used for setting prev_ProcessUtility to rewrite
* standard_ProcessUtility by other extension.
*/
void set_gsaudit_prehook(ProcessUtility_hook_type func)
{
next_ProcessUtility_hook = func;
}
/*
* Define GUC variables and install hooks upon module load.
* NOTE: _PG_init will be invoked(installed) many times

View File

@ -242,7 +242,7 @@ static void sepgsql_executor_start(QueryDesc* queryDesc, int eflags)
* It tries to rough-grained control on utility commands; some of them can
* break whole of the things if nefarious user would use.
*/
static void sepgsql_utility_command(processutility_context* processutility_cxt,
static void sepgsql_utility_command(Node* parsetree, const char* queryString, ParamListInfo params, bool isTopLevel,
DestReceiver* dest,
#ifdef PGXC
bool sentToRemote,
@ -251,7 +251,6 @@ static void sepgsql_utility_command(processutility_context* processutility_cxt,
{
sepgsql_context_info_t saved_context_info = sepgsql_context_info;
ListCell* cell = NULL;
Node* parsetree = processutility_cxt->parse_tree;
PG_TRY();
{
@ -301,14 +300,20 @@ static void sepgsql_utility_command(processutility_context* processutility_cxt,
}
if (next_ProcessUtility_hook)
(*next_ProcessUtility_hook)(processutility_cxt,
(*next_ProcessUtility_hook)(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,
#endif
completionTag);
else
standard_ProcessUtility(processutility_cxt,
standard_ProcessUtility(parsetree,
queryString,
params,
isTopLevel,
dest,
#ifdef PGXC
sentToRemote,

View File

@ -312,7 +312,7 @@ Datum /* have to return HeapTuple to Executor */
snprintf(sql, sizeof(sql), "INSERT INTO %s VALUES (", relname);
for (i = 1; i <= natts; i++) {
ctypes[i - 1] = SPI_gettypeid(tupdesc, i);
if (!(tupdesc->attrs[i - 1].attisdropped)) /* skip dropped columns */
if (!(tupdesc->attrs[i - 1]->attisdropped)) /* skip dropped columns */
{
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%c$%d", separ, i);
separ = ',';

10
contrib/sql_decoding/sql_decoding.cpp Normal file → Executable file
View File

@ -107,9 +107,9 @@ static void pg_decode_startup(LogicalDecodingContext* ctx, OutputPluginOptions*
foreach (option, ctx->output_plugin_options) {
DefElem* elem = (DefElem*)lfirst(option);
Assert(elem->arg == NULL || IsA(elem->arg, String));
if (strcmp(elem->defname, "include-xids") == 0) {
/* if option does not provide a value, it means its value is true */
if (elem->arg == NULL) {
@ -194,7 +194,7 @@ static void pg_decode_commit_txn(LogicalDecodingContext* ctx, ReorderBufferTXN*
OutputPluginPrepareWrite(ctx, true);
appendStringInfoString(ctx->out, "COMMIT");
appendStringInfo(ctx->out, " (at %s)", timestamptz_to_str(txn->commit_time));
appendStringInfo(ctx->out, " (at %s)", timestamptz_to_str(txn->commit_time));
appendStringInfo(ctx->out, " %lu", txn->csn);
OutputPluginWrite(ctx, true);
}
@ -302,7 +302,7 @@ static void TupleToStringinfo(StringInfo s, TupleDesc tupdesc, HeapTuple tuple)
Oid typoutput = 0; /* output function */
Datum origval = 0; /* possibly toasted Datum */
Form_pg_attribute attr = &tupdesc->attrs[natt]; /* the attribute itself */
Form_pg_attribute attr = tupdesc->attrs[natt]; /* the attribute itself */
if (attr->attisdropped || attr->attnum < 0) {
continue;
@ -354,7 +354,7 @@ static void TupleToStringinfoUpd(Relation relation, StringInfo s, TupleDesc tupd
bool isnull = false; /* column is null? */
bool typisvarlena = false;
Form_pg_attribute attr = &tupdesc->attrs[natt]; /* the attribute itself */
Form_pg_attribute attr = tupdesc->attrs[natt]; /* the attribute itself */
if (attr->attisdropped || attr->attnum < 0 || !IsRelationReplidentKey(relation, attr->attnum)) {
continue;

View File

@ -1337,35 +1337,35 @@ static void validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool
}
/* check that the types of the first two columns match */
if (tupdesc->attrs[0].atttypid != tupdesc->attrs[1].atttypid)
if (tupdesc->attrs[0]->atttypid != tupdesc->attrs[1]->atttypid)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid return type"),
errdetail("First two columns must be the same type.")));
/* check that the type of the third column is INT4 */
if (tupdesc->attrs[2].atttypid != INT4OID)
if (tupdesc->attrs[2]->atttypid != INT4OID)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid return type"),
errdetail("Third column must be type %s.", format_type_be(INT4OID))));
/* check that the type of the fourth column is TEXT if applicable */
if (show_branch && tupdesc->attrs[3].atttypid != TEXTOID)
if (show_branch && tupdesc->attrs[3]->atttypid != TEXTOID)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid return type"),
errdetail("Fourth column must be type %s.", format_type_be(TEXTOID))));
/* check that the type of the fifth column is INT4 */
if (show_branch && show_serial && tupdesc->attrs[4].atttypid != INT4OID)
if (show_branch && show_serial && tupdesc->attrs[4]->atttypid != INT4OID)
elog(ERROR,
"query-specified return tuple not valid for Connectby: "
"fifth column must be type %s",
format_type_be(INT4OID));
/* check that the type of the fifth column is INT4 */
if (!show_branch && show_serial && tupdesc->attrs[3].atttypid != INT4OID)
if (!show_branch && show_serial && tupdesc->attrs[3]->atttypid != INT4OID)
elog(ERROR,
"query-specified return tuple not valid for Connectby: "
"fourth column must be type %s",
@ -1383,8 +1383,8 @@ static bool compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupde
Oid sql_atttypid;
/* check the key_fld types match */
ret_atttypid = ret_tupdesc->attrs[0].atttypid;
sql_atttypid = sql_tupdesc->attrs[0].atttypid;
ret_atttypid = ret_tupdesc->attrs[0]->atttypid;
sql_atttypid = sql_tupdesc->attrs[0]->atttypid;
if (ret_atttypid != sql_atttypid)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
@ -1393,8 +1393,8 @@ static bool compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupde
"not match return key field datatype.")));
/* check the parent_key_fld types match */
ret_atttypid = ret_tupdesc->attrs[1].atttypid;
sql_atttypid = sql_tupdesc->attrs[1].atttypid;
ret_atttypid = ret_tupdesc->attrs[1]->atttypid;
sql_atttypid = sql_tupdesc->attrs[1]->atttypid;
if (ret_atttypid != sql_atttypid)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
@ -1421,8 +1421,8 @@ static bool compatCrosstabTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdes
return false;
/* check the rowid types match */
ret_atttypid = ret_tupdesc->attrs[0].atttypid;
sql_atttypid = sql_tupdesc->attrs[0].atttypid;
ret_atttypid = ret_tupdesc->attrs[0]->atttypid;
sql_atttypid = sql_tupdesc->attrs[0]->atttypid;
if (ret_atttypid != sql_atttypid)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),

49
contrib/test_decoding/test_decoding.cpp Normal file → Executable file
View File

@ -201,11 +201,13 @@ static bool pg_decode_filter(LogicalDecodingContext* ctx, RepOriginId origin_id)
}
static void tuple_to_stringinfo(Relation relation, StringInfo s, TupleDesc tupdesc, HeapTuple tuple, bool isOld)
{
if ((tuple->tupTableType == HEAP_TUPLE) && (HEAP_TUPLE_IS_COMPRESSED(tuple->t_data) ||
(int)HeapTupleHeaderGetNatts(tuple->t_data, tupdesc) > tupdesc->natts)) {
if (HEAP_TUPLE_IS_COMPRESSED(tuple->t_data))
return;
}
if ((int)HeapTupleHeaderGetNatts(tuple->t_data, tupdesc) != tupdesc->natts)
return;
int natt;
Oid oid;
/* print oid of tuple, it's not included in the TupleDesc */
@ -214,14 +216,15 @@ static void tuple_to_stringinfo(Relation relation, StringInfo s, TupleDesc tupde
}
/* print all columns individually */
for (int natt = 0; natt < tupdesc->natts; natt++) {
for (natt = 0; natt < tupdesc->natts; natt++) {
Form_pg_attribute attr; /* the attribute itself */
Oid typid; /* type of current attribute */
Oid typoutput; /* output function */
bool typisvarlena = false;
Datum origval; /* possibly toasted Datum */
bool isnull = true; /* column is null? */
attr = &tupdesc->attrs[natt];
attr = tupdesc->attrs[natt];
/*
* don't print dropped columns, we can't be sure everything is
@ -237,14 +240,10 @@ static void tuple_to_stringinfo(Relation relation, StringInfo s, TupleDesc tupde
if (attr->attnum < 0 || (isOld && !IsRelationReplidentKey(relation, attr->attnum)))
continue;
Oid typid = attr->atttypid; /* type of current attribute */
typid = attr->atttypid;
/* get Datum from tuple */
if (tuple->tupTableType == HEAP_TUPLE) {
origval = heap_getattr(tuple, natt + 1, tupdesc, &isnull);
} else {
origval = uheap_getattr((UHeapTuple)tuple, natt + 1, tupdesc, &isnull);
}
origval = heap_getattr(tuple, natt + 1, tupdesc, &isnull);
/* print attribute name */
appendStringInfoChar(s, ' ');
@ -327,13 +326,6 @@ static void pg_decode_change(
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, &change->data.tp.newtuple->tuple, false);
break;
case REORDER_BUFFER_CHANGE_UINSERT:
appendStringInfoString(ctx->out, " INSERT:");
if (change->data.utp.newtuple == NULL)
appendStringInfoString(ctx->out, " (no-tuple-data)");
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, (HeapTuple)(&change->data.utp.newtuple->tuple), false);
break;
case REORDER_BUFFER_CHANGE_UPDATE:
appendStringInfoString(ctx->out, " UPDATE:");
if (change->data.tp.oldtuple != NULL) {
@ -347,19 +339,6 @@ static void pg_decode_change(
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, &change->data.tp.newtuple->tuple, false);
break;
case REORDER_BUFFER_CHANGE_UUPDATE:
appendStringInfoString(ctx->out, " UPDATE:");
if (change->data.utp.oldtuple != NULL) {
appendStringInfoString(ctx->out, " old-key:");
tuple_to_stringinfo(relation, ctx->out, tupdesc, (HeapTuple)(&change->data.utp.oldtuple->tuple), true);
appendStringInfoString(ctx->out, " new-tuple:");
}
if (change->data.utp.newtuple == NULL)
appendStringInfoString(ctx->out, " (no-tuple-data)");
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, (HeapTuple)(&change->data.utp.newtuple->tuple), false);
break;
case REORDER_BUFFER_CHANGE_DELETE:
appendStringInfoString(ctx->out, " DELETE:");
@ -370,14 +349,6 @@ static void pg_decode_change(
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, &change->data.tp.oldtuple->tuple, true);
break;
case REORDER_BUFFER_CHANGE_UDELETE:
appendStringInfoString(ctx->out, " DELETE:");
if (change->data.utp.oldtuple == NULL)
appendStringInfoString(ctx->out, " (no-tuple-data)");
else
tuple_to_stringinfo(relation, ctx->out, tupdesc, (HeapTuple)(&change->data.utp.oldtuple->tuple), true);
break;
default:
Assert(false);
}

View File

@ -22,7 +22,7 @@
<repoType>Generic</repoType>
<id>
<offering>Huawei Secure C</offering>
<version>Huawei Secure C V100R001C01SPC010B002</version>
<version>Huawei Secure C V100R001C01SPC012B002</version>
</id>
<copies>
<copy>
@ -36,7 +36,7 @@
<repoType>Generic</repoType>
<id>
<offering>DOPRA SSP</offering>
<version>DOPRA SSP V300R021C10SPC120B500</version>
<version>DOPRA SSP V300R022C00SPC050B200</version>
</id>
<copies>
<copy>
@ -50,7 +50,7 @@
<repoType>Generic</repoType>
<id>
<offering>BiSheng JDK Enterprise</offering>
<version>BiSheng JDK Enterprise 2.1.0.330.B003</version>
<version>BiSheng JDK Enterprise 2.3.0.340.B003</version>
</id>
<copies>
<copy>
@ -74,4 +74,4 @@
</copies>
</dependency>
</dependencies>
</project>
</project>

View File

@ -233,11 +233,6 @@
<entry>security labels on database objects</entry>
</row>
<row>
<entry><link linkend="catalog-pg-set"><structname>pg_set</structname></link></entry>
<entry>set label and value definitions</entry>
</row>
<row>
<entry><link linkend="catalog-pg-shdepend"><structname>pg_shdepend</structname></link></entry>
<entry>dependencies on shared objects</entry>
@ -1387,16 +1382,6 @@
<entry>Password expiry time (only used for password authentication);
null if no expiration</entry>
</row>
<row>
<entry><structfield>rolpasswordext</structfield></entry>
<entry><type>text</type></entry>
<entry>
Password for other database encrypt rule if exists.
If we created a B compatibility database, sha1(sha1(password)) will
be stored here according to mysql_native_password strategy.
</entry>
</row>
</tbody>
</tgroup>
</table>

View File

@ -1186,7 +1186,7 @@ su - gaussdb
the size of each individual file in the WAL log. It may be useful
to adjust this size to control the granularity of WAL log shipping.
The default size is 16 megabytes.
The value must be a power of 2 between 1 and 512 (megabytes).
The value must be a power of 2 between 1 and 64 (megabytes).
Note that changing this value requires an gs_initdb.
</para>
</listitem>

View File

@ -12,7 +12,6 @@ Complete list of usable sgml source files in this directory.
<!ENTITY alterDatabase SYSTEM "alter_database.sgml">
<!ENTITY alterDefaultPrivileges SYSTEM "alter_default_privileges.sgml">
<!ENTITY alterDomain SYSTEM "alter_domain.sgml">
<!ENTITY alterEventTrigger SYSTEM "alter_event_trigger.sgml">
<!ENTITY alterExtension SYSTEM "alter_extension.sgml">
<!ENTITY alterForeignDataWrapper SYSTEM "alter_foreign_data_wrapper.sgml">
<!ENTITY alterForeignTable SYSTEM "alter_foreign_table.sgml">
@ -27,7 +26,6 @@ Complete list of usable sgml source files in this directory.
<!ENTITY alterOperator SYSTEM "alter_operator.sgml">
<!ENTITY alterOperatorClass SYSTEM "alter_opclass.sgml">
<!ENTITY alterOperatorFamily SYSTEM "alter_opfamily.sgml">
<!ENTITY alterProcedure SYSTEM "alter_procedure.sgml">
<!ENTITY alterRole SYSTEM "alter_role.sgml">
<!ENTITY alterSchema SYSTEM "alter_schema.sgml">
<!ENTITY alterServer SYSTEM "alter_server.sgml">
@ -65,7 +63,6 @@ Complete list of usable sgml source files in this directory.
<!ENTITY createConversion SYSTEM "create_conversion.sgml">
<!ENTITY createDatabase SYSTEM "create_database.sgml">
<!ENTITY createDomain SYSTEM "create_domain.sgml">
<!ENTITY createEventTrigger SYSTEM "create_event_trigger.sgml">
<!ENTITY createExtension SYSTEM "create_extension.sgml">
<!ENTITY createForeignDataWrapper SYSTEM "create_foreign_data_wrapper.sgml">
<!ENTITY createForeignTable SYSTEM "create_foreign_table.sgml">
@ -110,7 +107,6 @@ Complete list of usable sgml source files in this directory.
<!ENTITY dropConversion SYSTEM "drop_conversion.sgml">
<!ENTITY dropDatabase SYSTEM "drop_database.sgml">
<!ENTITY dropDomain SYSTEM "drop_domain.sgml">
<!ENTITY dropEventTrigger SYSTEM "drop_event_trigger.sgml">
<!ENTITY dropExtension SYSTEM "drop_extension.sgml">
<!ENTITY dropForeignDataWrapper SYSTEM "drop_foreign_data_wrapper.sgml">
<!ENTITY dropForeignTable SYSTEM "drop_foreign_table.sgml">

View File

@ -1,23 +0,0 @@
<refentry id="SQL-ALTEREVENTTRIGGER">
<refmeta>
<refentrytitle>ALTER EVENT TRIGGER</refentrytitle>
<manvolnum>7</manvolnum>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>ALTER EVENT TRIGGER</refname>
<refpurpose>change the definition of an event trigger</refpurpose>
</refnamediv>
<refsynopsisdiv>
<indexterm zone="sql-altereventtrigger">
<primary>ALTER EVENT TRIGGER</primary>
</indexterm>
<refsynopsisdiv>
<synopsis>
ALTER EVENT TRIGGER name DISABLE
ALTER EVENT TRIGGER name ENABLE [ REPLICA | ALWAYS ]
ALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
ALTER EVENT TRIGGER name RENAME TO new_name
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -30,27 +30,13 @@ ALTER EXTENSION <replaceable class="PARAMETER">name</replaceable> DROP <replacea
<phrase>where <replaceable class="PARAMETER">member_object</replaceable> is:</phrase>
AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> (agg_type [, ...] ) |
CAST (source_type AS target_type) |
COLLATION <replaceable class="PARAMETER">object_name</replaceable> |
CONVERSION <replaceable class="PARAMETER">object_name</replaceable> |
DOMAIN <replaceable class="PARAMETER">object_name</replaceable> |
FOREIGN DATA WRAPPER <replaceable class="PARAMETER">object_name</replaceable> |
FOREIGN TABLE <replaceable class="PARAMETER">object_name</replaceable> |
FUNCTION <replaceable class="PARAMETER">function_name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) |
MATERIALIZED VIEW <replaceable class="PARAMETER">object_name</replaceable> |
OPERATOR <replaceable class="PARAMETER">operator_name</replaceable> (left_type, right_type) |
OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING index_method |
OPERATOR FAMILY <replaceable class="PARAMETER">object_name</replaceable> USING index_method |
[ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">object_name</replaceable> |
SCHEMA <replaceable class="PARAMETER">object_name</replaceable> |
SEQUENCE <replaceable class="PARAMETER">object_name</replaceable> |
SERVER <replaceable class="PARAMETER">object_name</replaceable> |
TABLE <replaceable class="PARAMETER">object_name</replaceable> |
TEXT SEARCH CONFIGURATION <replaceable class="PARAMETER">object_name</replaceable> |
TEXT SEARCH DICTIONARY <replaceable class="PARAMETER">object_name</replaceable> |
TEXT SEARCH PARSER <replaceable class="PARAMETER">object_name</replaceable> |
TEXT SEARCH TEMPLATE <replaceable class="PARAMETER">object_name</replaceable> |
TYPE <replaceable class="PARAMETER">object_name</replaceable> |
VIEW <replaceable class="PARAMETER">object_name</replaceable>
</synopsis>

View File

@ -21,7 +21,7 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
RENAME TO <replaceable>new_name</replaceable>
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
OWNER TO <replaceable>new_owner</replaceable>
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
SET SCHEMA <replaceable>new_schema</replaceable>
@ -41,7 +41,6 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
SET <replaceable class="parameter">configuration_parameter</replaceable> FROM CURRENT
RESET <replaceable class="parameter">configuration_parameter</replaceable>
RESET ALL
COMMENT <replaceable class="parameter">'text'</replaceable>
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -15,9 +15,6 @@ ALTER SCHEMA schema_name
ALTER SCHEMA schema_name
OWNER TO new_owner;
ALTER SCHEMA schema_name {WITH | WITHOUT} BLOCKCHAIN;
ALTER SCHEMA schema_name
[ [ DEFAULT ] CHARACTER SET | CHARSET [ = ] charset ] [ [ DEFAULT ] COLLATE [ = ] collation ];
NOTICE: '[ [ DEFAULT ] CHARACTER SET | CHARSET [ = ] charset ] [ [ DEFAULT ] COLLATE [ = ] collation ]' is only available in CENTRALIZED mode and B-format database!
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -23,7 +23,6 @@ PostgreSQL documentation
<synopsis>
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> CONNECTION '<replaceable>conninfo</replaceable>'
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> SET PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...]
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> REFRESH PUBLICATION [ WITH ( <replaceable class="parameter">refresh_option</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) ]
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> ENABLE
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> SET ( <replaceable class="parameter">subscription_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )
ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
@ -47,23 +46,6 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
(Currently, all subscription owners must be superusers, so the owner checks
will be bypassed in practice. But this might change in the future.)
</para>
<para>
When refreshing a publication we remove the relations that are no longer
part of the publication and we also remove the table synchronization slots
if there are any. It is necessary to remove these slots so that the resources
allocated for the subscription on the remote host are released. If due to
network breakdown or some other error, <productname>openGauss</productname>
is unable to remove the slots, an ERROR will be reported. To proceed in this
situation, the user either needs to retry the operation or disassociate the
slot from the subscription and drop the subscription as explained in
<xref linkend="sql-dropsubscription"/>.
</para>
<para>
Commands <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command>
cannot be executed inside a transaction block.
</para>
</refsect1>
<refsect1>
@ -94,36 +76,6 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<term><literal>SET PUBLICATION <replaceable class="parameter">publication_name</replaceable></literal></term>
</varlistentry>
<varlistentry>
<term><literal>REFRESH PUBLICATION</literal></term>
<listitem>
<para>
Fetch missing table information from publisher. This will start
replication of tables that were added to the subscribed-to publications
since the last invocation of <command>REFRESH PUBLICATION</command> or
since <command>CREATE SUBSCRIPTION</command>.
</para>
<para>
<replaceable>refresh_option</replaceable> specifies additional options for the
refresh operation. The supported options are:
<variablelist>
<varlistentry>
<term><literal>copy_data</literal> (<type>boolean</type>)</term>
<listitem>
<para>
Specifies whether the existing data in the publications that are
being subscribed to should be copied once the replication starts.
The default is <literal>true</literal>. (Previously subscribed
tables are not copied.)
</para>
</listitem>
</varlistentry>
</variablelist></para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ENABLE</literal></term>
<listitem>

View File

@ -11,6 +11,8 @@
<refsynopsisdiv>
<synopsis>
ALTER SYSTEM SET { GUC_name } TO { GUC_value };
NOTICE: only supported in opengauss, not supported in distributeGauss or privateGauss.
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -51,19 +51,11 @@ column_clause
| FORCE ROW LEVEL SECURITY
| NO FORCE ROW LEVEL SECURITY
| ENCRYPTION KEY ROTATION
| AUTO_INCREMENT [ = ] value
| ALTER INDEX index_name [ VISBLE | INVISIBLE ]
| [ [ DEFAULT ] CHARACTER SET | CHARSET [ = ] charset ] [ [ DEFAULT ] COLLATE [ = ] collation ]
| CONVERT TO CHARACTER SET | CHARSET charset [ COLLATE collation ]
NOTICE: '[ CHARACTER SET | CHARSET ]' is only available in CENTRALIZED mode and B-format database!
NOTICE: '[ COLLATE ]' is only available in CENTRALIZED mode and B-format database!
where column_clause can be:
ADD [ COLUMN ] column_name data_type [ CHARACTER SET | CHARSET charset ] [ compress_mode ] [ COLLATE collation ] [ column_constraint [ ... ] ] [ FIRST | AFTER column_name ]
ADD [ COLUMN ] column_name data_type [ compress_mode ] [ COLLATE collation ] [ column_constraint [ ... ] ]
| MODIFY column_name data_type
| MODIFY column_name [ CONSTRAINT constraint_name ] NOT NULL [ ENABLE ]
| MODIFY column_name [ CONSTRAINT constraint_name ] NULL
| MODIFY [ COLUMN ] column_name data_type [ CHARACTER SET | CHARSET charset ] [ COLLATE collation ] [ column_constraint [ ... ] ] [FIRST | AFTER column_name]
| CHANGE [ COLUMN ] column_name new_column_name data_type [ CHARACTER SET | CHARSET charset ] [ COLLATE collation ] [ column_constraint [ ... ] ] [FIRST | AFTER column_name]
| DROP [ COLUMN ] [ IF EXISTS ] column_name [ RESTRICT | CASCADE ]
| ALTER [ COLUMN ] column_name [ SET DATA ] TYPE data_type [ COLLATE collation ] [ USING expression ]
| ALTER [ COLUMN ] column_name { SET DEFAULT expression | DROP DEFAULT }
@ -74,32 +66,28 @@ ADD [ COLUMN ] column_name data_type [ CHARACTER SET | CHARSET charset ] [ compr
| ALTER [ COLUMN ] column_name SET ( {attribute_option = value} [, ... ] )
| ALTER [ COLUMN ] column_name RESET ( attribute_option [, ... ] )
| ALTER [ COLUMN ] column_name SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
NOTICE: 'MODIFY [ COLUMN ] ...' action is only available in CENTRALIZED mode and B-format database!
NOTICE: 'CHANGE [ COLUMN ] ...' action is only available in CENTRALIZED mode and B-format database!
where column_constraint can be:
[ CONSTRAINT constraint_name ]
{ NOT NULL |
NULL |
CHECK ( expression ) |
DEFAULT default_expr |
GENERATED ALWAYS AS ( generation_expr ) [STORED] |
AUTO_INCREMENT |
UNIQUE [KEY] index_parameters |
GENERATED ALWAYS AS ( generation_expr ) STORED |
UNIQUE index_parameters |
PRIMARY KEY index_parameters |
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
NOTICE: 'UNIQUE KEY' in table_constraint is only available in CENTRALIZED mode and B-format database!
where compress_mode can be:
{ DELTA | PREFIX | DICTIONARY | NUMSTR | NOCOMPRESS }
where table_constraint can be:
[ CONSTRAINT [ constraint_name ] ]
[ CONSTRAINT constraint_name ]
{ CHECK ( expression ) |
UNIQUE [ idx_name ] [ USING method ] ( { { column_name | ( expression ) } [ ASC | DESC ] } [, ... ] ) index_parameters [ VISIBLE | INVISIBLE ] |
PRIMARY KEY [ USING method ] ( { column_name [ ASC | DESC ] }[, ... ] ) index_parameters [ VISIBLE | INVISIBLE ] |
UNIQUE ( column_name [, ... ] ) index_parameters |
PRIMARY KEY ( column_name [, ... ] ) index_parameters |
PARTIAL CLUSTER KEY ( column_name [, ... ] ) |
FOREIGN KEY [ idx_name ] ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where index_parameters can be:
@ -109,17 +97,6 @@ where table_constraint_using_index can be:
[ CONSTRAINT constraint_name ]
{ UNIQUE | PRIMARY KEY } USING INDEX index_name
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
NOTICE: '[ constraint_name ]' in table_constraint is optional in CENTRALIZED mode and B-format database, it is mandatory in other scenarios.
NOTICE: '[ index_name ]' in table_constraint is only available in CENTRALIZED mode and B-format database!
NOTICE: '[ USING method ]' in table_constraint is only available in CENTRALIZED mode and B-format database!
NOTICE: '[ ASC | DESC ]' in table_constraint is only available in CENTRALIZED mode and B-format database!
NOTICE: '( expression )' in 'UNIQUE' clause of table_constraint is only available in CENTRALIZED mode and B-format database!
NOTICE: 'AUTO_INCREMENT' is only available in CENTRALIZED mode and B-format database!
NOTICE: '[ FIRST | AFTER column_name ]' clause is only available in CENTRALIZED mode!
NOTICE: '[ FIRST | AFTER column_name ]' in 'MODIFY | CHANGE [ COLUMN ] ...' clause is only available in B-format database!
NOTICE: '[ CHARACTER SET | CHARSET charset ]' is only available in CENTRALIZED mode and B-format database!
NOTICE: '[ VISIBLE | INVISIBLE ]' is only avaliable in CENTRALIZED mode and B-format database!
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -11,7 +11,9 @@
<refsynopsisdiv>
<synopsis>
ALTER TABLE [ IF EXISTS ] { table_name [*] | ONLY table_name | ONLY ( table_name )}
{ action [, ... ] | rename_clause | reset_clause };
action [, ... ];
ALTER TABLE [ IF EXISTS ] { table_name [*] | ONLY table_name | ONLY ( table_name )}
RENAME PARTITION { partion_name | FOR ( partition_value [, ...] ) } TO partition_new_name;
where action can be:
move_clause |
@ -28,16 +30,16 @@ MOVE PARTITION { partion_name | FOR ( partition_value [, ...] ) } TABLESPACE tab
where exchange_clause can be:
EXCHANGE PARTITION { ( partition_name ) | FOR ( partition_value [, ...] ) }
WITH TABLE {[ ONLY ] ordinary_table_name | ordinary_table_name * | ONLY ( ordinary_table_name )}
[ { WITH | WITHOUT } VALIDATION ] [ VERBOSE ] [ UPDATE GLOBAL INDEX ]
[ { WITH | WITHOUT } VALIDATION ] [ VERBOSE ]
where row_clause can be:
{ ENABLE | DISABLE } ROW MOVEMENT
where merge_clause can be:
MERGE PARTITIONS { partition_name } [, ...] INTO PARTITION partition_name
[ TABLESPACE tablespacename ] [ UPDATE GLOBAL INDEX ]
[ TABLESPACE tablespacename ]
where modify_clause can be:
MODIFY PARTITION partition_name { UNUSABLE LOCAL INDEXES | REBUILD UNUSABLE LOCAL INDEXES }
where split_clause can be:
SPLIT PARTITION { partition_name | FOR ( partition_value [, ...] ) } { split_point_clause | no_split_point_clause } [ UPDATE GLOBAL INDEX ]
SPLIT PARTITION { partition_name | FOR ( partition_value [, ...] ) } { split_point_clause | no_split_point_clause }
where split_point_clause can be:
AT ( partition_value ) INTO ( PARTITION partition_name [ TABLESPACE tablespacename ] , PARTITION partition_name [ TABLESPACE tablespacename ] )
where no_split_point_clause can be:
@ -58,13 +60,10 @@ PARTITION partition_name {
{END({partition_value | MAXVALUE})}
} [TABLESPACE tablespace_name]
where drop_clause can be:
DROP PARTITION { partition_name | FOR ( partition_value [, ...] ) } [ UPDATE GLOBAL INDEX ]
DROP PARTITION { partition_name | FOR ( partition_value [, ...] ) }
where truncate_clause can be:
TRUNCATE PARTITION { partition_name | FOR ( partition_value [, ...] ) } [ UPDATE GLOBAL INDEX ]
where rename_clause can be:
RENAME PARTITION { partion_name | FOR ( partition_value [, ...] ) } TO partition_new_name;
where reset_clause can be:
RESET PARTITION;
NOTICE: 'truncate_clause' is only avaliable in CENTRALIZED mode!
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -11,16 +11,13 @@
<refsynopsisdiv>
<synopsis>
ALTER TABLE [ IF EXISTS ] { table_name [*] | ONLY table_name | ONLY ( table_name )}
{ action [, ... ] | reset_clause };
action [, ... ];
where action can be:
row_clause |
add_clause |
drop_clause |
split_clause |
truncate_clause
where row_clause can be:
{ ENABLE | DISABLE } ROW MOVEMENT
where add_clause can be:
ADD { partition_less_than_item | partition_list_item } [ ( subpartition_definition_list ) ]
MODIFY PARTITION partition_name ADD subpartition_definition
@ -29,7 +26,7 @@ PARTITION partition_name VALUES LESS THAN ( partition_value | MAXVALUE ) [ TABLE
where partition_list_item can be:
PARTITION partition_name VALUES ( partition_value [, ...] | DEFAULT ) [ TABLESPACE tablespacename ]
where subpartition_definition_list can be:
SUBPARTITION subpartition_name { VALUES LESS THAN ( partition_value | MAXVALUE ) | VALUES ( partition_value [, ...] | DEFAULT ) } [ TABLESPACE tablespace ]
SUBPARTITION subpartition_name [ VALUES LESS THAN ( partition_value | MAXVALUE ) | VALUES ( partition_value [, ...] | DEFAULT )] [ TABLESPACE tablespace ]
where drop_clause can be:
DROP PARTITION { partition_name | FOR ( partition_value ) } [ UPDATE GLOBAL INDEX ]
DROP SUBPARTITION { subpartition_name | FOR ( partition_value, subpartition_value ) } [ UPDATE GLOBAL INDEX ]
@ -40,8 +37,7 @@ AT ( subpartition_value ) INTO ( SUBPARTITION subpartition_name [ TABLESPACE tab
VALUES ( subpartition_value ) INTO ( SUBPARTITION subpartition_name [ TABLESPACE tablespacename ] , SUBPARTITION subpartition_name [ TABLESPACE tablespacename ] )
where truncate_clause can be:
TRUNCATE SUBPARTITION { subpartition_name } [ UPDATE GLOBAL INDEX ]
where reset_clause can be:
RESET PARTITION;
NOTICE: 'ALTER TABLE SUBPARTITION' is only avaliable in CENTRALIZED mode!
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -10,7 +10,7 @@
</refnamediv>
<refsynopsisdiv>
<synopsis>
ALTER USER [ IF EXISTS ] user_name [ [ WITH ] option [ ... ] ];
ALTER USER user_name [ [ WITH ] option [ ... ] ];
ALTER USER user_name
RENAME TO new_name;
ALTER USER user_name [ IN DATABASE database_name ]

View File

@ -24,8 +24,6 @@ ALTER VIEW [ IF EXISTS ] view_name
SET ( {view_option_name [= view_option_value]} [, ... ] );
ALTER VIEW [ IF EXISTS ] view_name
RESET ( view_option_name [, ... ] );
ALTER [DEFINER = user] VIEW view_name [ ( column_name [, ...] ) ]
AS query;
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -14,7 +14,7 @@
[ table_name [ ( column_name [, ...] ) ] ];
{ANALYZE | ANALYSE} [ VERBOSE ]
[ table_name [ ( column_name [, ...] ) ] ]
PARTITION (partition_name);
PARTITION patrition_name;
{ANALYZE | ANALYSE} [ VERBOSE ]
{ foreign_table_name | FOREIGN TABLES };
{ANALYZE | ANALYSE} [ VERBOSE ]
@ -23,7 +23,7 @@
{ANALYZE | ANALYSE} VERIFY {FAST|COMPLETE}
table_name|index_name [CASCADE];
{ANALYZE | ANALYSE} VERIFY {FAST|COMPLETE}
table_name PARTITION (partition_name) [CASCADE];
table_name PARTITION (patrition_name) [CASCADE];
</synopsis>
</refsynopsisdiv>
</refentry>

View File

@ -14,7 +14,7 @@
[ table_name [ ( column_name [, ...] ) ] ];
{ ANALYZE | ANALYSE } [ VERBOSE ]
[ table_name [ ( column_name [, ...] ) ] ]
PARTITION (partition_name);
PARTITION patrition_name;
{ ANALYZE | ANALYSE } [ VERBOSE ]
{ foreign_table_name | FOREIGN TABLES };
{ ANALYZE | ANALYSE } [ VERBOSE ]
@ -22,7 +22,7 @@
{ ANALYZE | ANALYSE } VERIFY { FAST | COMPLETE };
{ ANALYZE | ANALYSE } VERIFY { FAST | COMPLETE } table_name | index_name [ CASCADE ];
{ ANALYZE | ANALYSE } VERIFY { FAST | COMPLETE }
table_name PARTITION (partition_name) [ CASCADE ];
table_name PARTITION (patrition_name) [ CASCADE ];
</synopsis>
</refsynopsisdiv>
</refentry>

Some files were not shown because too many files have changed in this diff Show More