diff --git a/.github/workflows/merge-build-push.yml b/.github/workflows/merge-build-push.yml index 90cadadd..fca706f1 100644 --- a/.github/workflows/merge-build-push.yml +++ b/.github/workflows/merge-build-push.yml @@ -4,17 +4,24 @@ on: pull_request_target: types: - closed + create: + workflow_dispatch: + inputs: + source_branch: + required: false + default: "" jobs: build-and-deploy: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true + if: github.event_name == 'workflow_dispatch' || github.event_name == 'create' || github.event.pull_request.merged == true permissions: contents: write pull-requests: write steps: - name: PR was merged + if: github.event.pull_request.number != '' run: | echo "PR #${{ github.event.pull_request.number }} was merged into ${{ github.event.pull_request.base.ref }}." echo "Head commit was: ${{ github.event.pull_request.head.sha }}" @@ -23,6 +30,7 @@ jobs: uses: actions/checkout@v4 with: path: ivorysql_doc + ref: ${{ inputs.source_branch || github.ref }} - name: Checkout Doc Builder Repository (doc_builder) uses: actions/checkout@v4 @@ -91,6 +99,23 @@ jobs: fi done + - name: Pin PDF assembler to merged PR branch + working-directory: ./ivory-doc-builder + env: + MERGED_BRANCH: ${{ inputs.source_branch || github.event.pull_request.base.ref || github.ref_name }} + COMPONENT_NAME: ivorysql-doc + run: | + if [[ -z "${MERGED_BRANCH}" ]]; then + echo "::error::Merged branch name is empty, cannot update PDF component version." + exit 1 + fi + + TARGET_COMPONENT_VERSION="${MERGED_BRANCH}@${COMPONENT_NAME}" + echo "Setting antora-assembler.yml component_versions to ${TARGET_COMPONENT_VERSION}" + yq -i ".component_versions = \"${TARGET_COMPONENT_VERSION}\"" antora-assembler.yml + echo "Updated antora-assembler.yml:" + cat antora-assembler.yml + - name: Checkout Web Repository (web) uses: actions/checkout@v4 with: @@ -98,6 +123,44 @@ jobs: path: www_publish_target token: ${{ secrets.WEB_TOKEN }} + - name: Ensure web index redirects to latest home + id: update_web_index + working-directory: ./www_publish_target + env: + LATEST_VERSION: ${{ steps.latest_version_step.outputs.version }} + MERGED_PR_BASE: ${{ github.event.pull_request.base.ref || github.ref_name }} + run: | + set -euo pipefail + + TARGET_BRANCH="v${LATEST_VERSION}" + EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/v${LATEST_VERSION}/welcome.html" + + if [[ "${MERGED_PR_BASE}" != "${TARGET_BRANCH}" ]]; then + echo "Base branch ${MERGED_PR_BASE} is not the latest version branch ${TARGET_BRANCH}, skip index redirect check." + echo "index_updated=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + UPDATE_NEEDED=false + for lang in cn en; do + FILE_PATH="docs/${lang}/index.html" + if [[ ! -f "${FILE_PATH}" ]]; then + echo "Missing ${FILE_PATH}, cannot update redirect." + continue + fi + + if grep -q "${EXPECTED_PATH}" "${FILE_PATH}"; then + echo "${FILE_PATH} already points to latest ${LATEST_VERSION}." + else + # Replace all version segments like vX.Y or vX.Y.Z in href/location/meta/script targets + sed -i -E "s@ivorysql-doc/v[0-9]+(\\.[0-9]+){1,2}/v[0-9]+(\\.[0-9]+){1,2}/welcome\\.html@${EXPECTED_PATH}@g" "${FILE_PATH}" + UPDATE_NEEDED=true + echo "Updated ${FILE_PATH} to latest ${LATEST_VERSION} redirect." + fi + done + + echo "index_updated=${UPDATE_NEEDED}" >> "$GITHUB_OUTPUT" + - name: Setup Ruby and Bundler uses: ruby/setup-ruby@v1 with: @@ -127,12 +190,66 @@ jobs: ls ../www_publish_target/ npx antora generate --stacktrace --to-dir ../www_publish_target/docs/en antora-playbook-EN.yml + - name: Copy English PDF export into web repo + working-directory: ./ivory-doc-builder + env: + MERGED_BRANCH: ${{ inputs.source_branch || github.event.pull_request.base.ref || github.ref_name }} + COMPONENT_NAME: ivorysql-doc + run: | + set -euo pipefail + + if [[ -z "${MERGED_BRANCH}" ]]; then + echo "::error::Merged branch name is empty, cannot locate PDF output." + exit 1 + fi + + SOURCE_PDF_EN="build/assembler-pdf/${COMPONENT_NAME}/${MERGED_BRANCH}/_exports/index.pdf" + DEST_EN="../www_publish_target/docs/en/${COMPONENT_NAME}/${MERGED_BRANCH}/ivorysql.pdf" + + if [[ ! -f "${SOURCE_PDF_EN}" ]]; then + echo "::error::English PDF not found at ${SOURCE_PDF_EN}" + exit 1 + fi + + echo "Copying English PDF from ${SOURCE_PDF_EN} to web repo target..." + mkdir -p "$(dirname "${DEST_EN}")" + cp "${SOURCE_PDF_EN}" "${DEST_EN}" + echo "English PDF copied to:" + echo " - ${DEST_EN}" + - name: Build Chinese Documentation working-directory: ./ivory-doc-builder run: | echo "Building Chinese site..." npx antora generate --stacktrace --to-dir ../www_publish_target/docs/cn antora-playbook-CN.yml + - name: Copy Chinese PDF export into web repo + working-directory: ./ivory-doc-builder + env: + MERGED_BRANCH: ${{ inputs.source_branch || github.event.pull_request.base.ref || github.ref_name }} + COMPONENT_NAME: ivorysql-doc + run: | + set -euo pipefail + + if [[ -z "${MERGED_BRANCH}" ]]; then + echo "::error::Merged branch name is empty, cannot locate PDF output." + exit 1 + fi + + SOURCE_PDF="build/assembler-pdf/${COMPONENT_NAME}/${MERGED_BRANCH}/_exports/index.pdf" + DEST_CN="../www_publish_target/docs/cn/${COMPONENT_NAME}/${MERGED_BRANCH}/ivorysql.pdf" + + if [[ ! -f "${SOURCE_PDF}" ]]; then + echo "::error::PDF not found at ${SOURCE_PDF}" + exit 1 + fi + + echo "Copying PDF from ${SOURCE_PDF} to web repo targets..." + mkdir -p "$(dirname "${DEST_CN}")" + cp "${SOURCE_PDF}" "${DEST_CN}" + echo "PDF copied to:" + echo " - ${DEST_CN}" + - name: Commit and Push to web Repository new branch , pull request id: commit_push_new_branch working-directory: ./www_publish_target diff --git a/CN/antora.yml b/CN/antora.yml index 0f42c9d5..90220bc2 100644 --- a/CN/antora.yml +++ b/CN/antora.yml @@ -1,10 +1,21 @@ name: ivorysql-doc title: 文档中心 -version: master -start_page: master/welcome.adoc +version: v5.1 +start_page: v5.1/welcome.adoc asciidoc: attributes: source-language: asciidoc@ table-caption: false + ivorysql-version: 5.1 + pg-version: 18.1 + package-link: 'https://github.com/ivorysql/ivorysql' + package-link-x86_64-deb: 'IvorySQL-5.1-62069c2-20251211.amd64.deb' + package-link-x86_64-rpm: 'IvorySQL-5.1-62069c2-20251211.x86_64.rpm' + package-link-aarch64-deb: 'IvorySQL-5.1-62069c2-20251211.arm64.deb' + package-link-aarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.aarch64.rpm' + package-link-mips64el-deb: 'IvorySQL-5.1-62069c2-20251211.mips64el.deb' + package-link-mips64el-rpm: 'IvorySQL-5.1-62069c2-20251211.mips64el.rpm' + package-link-loongarch64-deb: 'IvorySQL-5.1-62069c2-20251211.loongarch64.deb' + package-link-loongarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.loongarch64.rpm' nav: - modules/ROOT/nav.adoc diff --git a/CN/modules/ROOT/nav.adoc b/CN/modules/ROOT/nav.adoc index deb089ac..9868f15c 100644 --- a/CN/modules/ROOT/nav.adoc +++ b/CN/modules/ROOT/nav.adoc @@ -1,90 +1,90 @@ * IvorySQL -** xref:master/welcome.adoc[欢迎] -** xref:master/1.adoc[发行说明] -** xref:master/2.adoc[关于IvorySQL] +** xref:v{ivorysql-version}/welcome.adoc[欢迎] +** xref:v{ivorysql-version}/1.adoc[发行说明] +** xref:v{ivorysql-version}/2.adoc[关于IvorySQL] ** IvorySQL入门 -*** xref:master/3.1.adoc[快速开始] -*** xref:master/3.2.adoc[日常监控] -*** xref:master/3.3.adoc[日常维护] +*** xref:v{ivorysql-version}/3.1.adoc[快速开始] +*** xref:v{ivorysql-version}/3.2.adoc[日常监控] +*** xref:v{ivorysql-version}/3.3.adoc[日常维护] ** IvorySQL高级 -*** xref:master/4.1.adoc[安装指南] -*** xref:master/4.2.adoc[集群搭建] -*** xref:master/4.5.adoc[迁移指南] -*** xref:master/4.3.adoc[开发者指南] +*** xref:v{ivorysql-version}/4.1.adoc[安装指南] +*** xref:v{ivorysql-version}/4.2.adoc[集群搭建] +*** xref:v{ivorysql-version}/4.5.adoc[迁移指南] +*** xref:v{ivorysql-version}/4.3.adoc[开发者指南] *** 容器化指南 -**** xref:master/4.6.1.adoc[K8S部署] -**** xref:master/4.6.2.adoc[Operator部署] -**** xref:master/4.6.4.adoc[Docker & Podman部署] -**** xref:master/4.6.3.adoc[Docker Swarm & Docker Compose部署] -*** xref:master/4.4.adoc[运维管理指南] +**** xref:v{ivorysql-version}/4.6.1.adoc[K8S部署] +**** xref:v{ivorysql-version}/4.6.2.adoc[Operator部署] +**** xref:v{ivorysql-version}/4.6.4.adoc[Docker & Podman部署] +**** xref:v{ivorysql-version}/4.6.3.adoc[Docker Swarm & Docker Compose部署] +*** xref:v{ivorysql-version}/4.4.adoc[运维管理指南] *** 云服务平台指南 -**** xref:master/4.7.1.adoc[IvorySQL Cloud安装] -**** xref:master/4.7.2.adoc[IvorySQL Cloud使用] +**** xref:v{ivorysql-version}/4.7.1.adoc[IvorySQL Cloud安装] +**** xref:v{ivorysql-version}/4.7.2.adoc[IvorySQL Cloud使用] ** IvorySQL生态 -*** xref:master/cpu_arch_adp.adoc[芯片架构适配] -*** xref:master/os_arch_adp.adoc[操作系统适配] +*** xref:v{ivorysql-version}/cpu_arch_adp.adoc[芯片架构适配] +*** xref:v{ivorysql-version}/os_arch_adp.adoc[操作系统适配] *** 生态组件适配 -**** xref:master/5.0.adoc[概述] -**** xref:master/5.1.adoc[postgis] -**** xref:master/5.2.adoc[pgvector] -**** xref:master/5.3.adoc[pgddl(DDL Extractor)] -**** xref:master/5.4.adoc[pg_cron] -**** xref:master/5.5.adoc[pgsql-http] -**** xref:master/5.6.adoc[plpgsql_check] -**** xref:master/5.7.adoc[pgroonga] -**** xref:master/5.8.adoc[pgaudit] -**** xref:master/5.9.adoc[pgrouting] -**** xref:master/5.10.adoc[system_stats] +**** xref:v{ivorysql-version}/5.0.adoc[概述] +**** xref:v{ivorysql-version}/5.1.adoc[postgis] +**** xref:v{ivorysql-version}/5.2.adoc[pgvector] +**** xref:v{ivorysql-version}/5.3.adoc[pgddl(DDL Extractor)] +**** xref:v{ivorysql-version}/5.4.adoc[pg_cron] +**** xref:v{ivorysql-version}/5.5.adoc[pgsql-http] +**** xref:v{ivorysql-version}/5.6.adoc[plpgsql_check] +**** xref:v{ivorysql-version}/5.7.adoc[pgroonga] +**** xref:v{ivorysql-version}/5.8.adoc[pgaudit] +**** xref:v{ivorysql-version}/5.9.adoc[pgrouting] +**** xref:v{ivorysql-version}/5.10.adoc[system_stats] ** IvorySQL架构设计 *** 查询处理 -**** xref:master/6.1.1.adoc[双parser] +**** xref:v{ivorysql-version}/6.1.1.adoc[双parser] *** 兼容框架 -**** xref:master/7.1.adoc[框架设计] -**** xref:master/7.2.adoc[GUC框架] -**** xref:master/7.4.adoc[双模式设计] -**** xref:master/6.2.1.adoc[initdb过程] +**** xref:v{ivorysql-version}/7.1.adoc[框架设计] +**** xref:v{ivorysql-version}/7.2.adoc[GUC框架] +**** xref:v{ivorysql-version}/7.4.adoc[双模式设计] +**** xref:v{ivorysql-version}/6.2.1.adoc[initdb过程] *** 兼容特性 -**** xref:master/6.3.1.adoc[like] -**** xref:master/6.3.3.adoc[RowID] -**** xref:master/6.3.2.adoc[OUT 参数] -**** xref:master/6.3.4.adoc[%TYPE、%ROWTYPE] -**** xref:master/6.3.5.adoc[NLS 参数] -**** xref:master/6.3.6.adoc[函数与存储过程] -**** xref:master/6.3.7.adoc[嵌套子函数] -**** xref:master/6.3.8.adoc[Force View] -**** xref:master/6.3.9.adoc[大小写转换] -**** xref:master/6.3.10.adoc[sys_guid 函数] -**** xref:master/6.3.11.adoc[空字符串转null] -**** xref:master/6.3.12.adoc[CALL INTO] +**** xref:v{ivorysql-version}/6.3.1.adoc[like] +**** xref:v{ivorysql-version}/6.3.3.adoc[RowID] +**** xref:v{ivorysql-version}/6.3.2.adoc[OUT 参数] +**** xref:v{ivorysql-version}/6.3.4.adoc[%TYPE、%ROWTYPE] +**** xref:v{ivorysql-version}/6.3.5.adoc[NLS 参数] +**** xref:v{ivorysql-version}/6.3.6.adoc[函数与存储过程] +**** xref:v{ivorysql-version}/6.3.7.adoc[嵌套子函数] +**** xref:v{ivorysql-version}/6.3.8.adoc[Force View] +**** xref:v{ivorysql-version}/6.3.9.adoc[大小写转换] +**** xref:v{ivorysql-version}/6.3.10.adoc[sys_guid 函数] +**** xref:v{ivorysql-version}/6.3.11.adoc[空字符串转null] +**** xref:v{ivorysql-version}/6.3.12.adoc[CALL INTO] *** 内置函数 -**** xref:master/6.4.1.adoc[sys_context] -**** xref:master/6.4.2.adoc[userenv] -*** xref:master/6.5.adoc[国标GB18030] +**** xref:v{ivorysql-version}/6.4.1.adoc[sys_context] +**** xref:v{ivorysql-version}/6.4.2.adoc[userenv] +*** xref:v{ivorysql-version}/6.5.adoc[国标GB18030] ** Oracle兼容功能列表 -*** xref:master/7.3.adoc[1、大小写转换] -*** xref:master/7.5.adoc[2、LIKE操作符] -*** xref:master/7.6.adoc[3、匿名块] -*** xref:master/7.7.adoc[4、函数与存储过程] -*** xref:master/7.8.adoc[5、内置数据类型与内置函数] -*** xref:master/7.9.adoc[6、端口与IP] -*** xref:master/7.10.adoc[7、XML函数] -*** xref:master/7.11.adoc[8、sequence] -*** xref:master/7.12.adoc[9、包] -*** xref:master/7.13.adoc[10、不可见列] -*** xref:master/7.14.adoc[11、RowID] -*** xref:master/7.15.adoc[12、OUT 参数] -*** xref:master/7.16.adoc[13、%TYPE、%ROWTYPE] -*** xref:master/7.17.adoc[14、NLS 参数] -*** xref:master/7.18.adoc[15、Force View] -*** xref:master/7.19.adoc[16、嵌套子函数] -*** xref:master/7.20.adoc[17、sys_guid 函数] -*** xref:master/7.21.adoc[18、空字符串转null] -*** xref:master/7.22.adoc[19、CALL INTO] +*** xref:v{ivorysql-version}/7.3.adoc[1、大小写转换] +*** xref:v{ivorysql-version}/7.5.adoc[2、LIKE操作符] +*** xref:v{ivorysql-version}/7.6.adoc[3、匿名块] +*** xref:v{ivorysql-version}/7.7.adoc[4、函数与存储过程] +*** xref:v{ivorysql-version}/7.8.adoc[5、内置数据类型与内置函数] +*** xref:v{ivorysql-version}/7.9.adoc[6、端口与IP] +*** xref:v{ivorysql-version}/7.10.adoc[7、XML函数] +*** xref:v{ivorysql-version}/7.11.adoc[8、sequence] +*** xref:v{ivorysql-version}/7.12.adoc[9、包] +*** xref:v{ivorysql-version}/7.13.adoc[10、不可见列] +*** xref:v{ivorysql-version}/7.14.adoc[11、RowID] +*** xref:v{ivorysql-version}/7.15.adoc[12、OUT 参数] +*** xref:v{ivorysql-version}/7.16.adoc[13、%TYPE、%ROWTYPE] +*** xref:v{ivorysql-version}/7.17.adoc[14、NLS 参数] +*** xref:v{ivorysql-version}/7.18.adoc[15、Force View] +*** xref:v{ivorysql-version}/7.19.adoc[16、嵌套子函数] +*** xref:v{ivorysql-version}/7.20.adoc[17、sys_guid 函数] +*** xref:v{ivorysql-version}/7.21.adoc[18、空字符串转null] +*** xref:v{ivorysql-version}/7.22.adoc[19、CALL INTO] ** IvorySQL贡献指南 -*** xref:master/8.1.adoc[社区贡献指南] -*** xref:master/8.2.adoc[asciidoc语法快速参考] -** xref:master/9.adoc[工具参考] -** xref:master/10.adoc[FAQ] +*** xref:v{ivorysql-version}/8.1.adoc[社区贡献指南] +*** xref:v{ivorysql-version}/8.2.adoc[asciidoc语法快速参考] +** xref:v{ivorysql-version}/9.adoc[工具参考] +** xref:v{ivorysql-version}/10.adoc[FAQ] * PostgreSQL -** xref:master/100.adoc[PG参数参考手册] -** xref:master/110.adoc[PG函数参考手册] +** xref:v{ivorysql-version}/100.adoc[PG参数参考手册] +** xref:v{ivorysql-version}/110.adoc[PG函数参考手册] diff --git a/CN/modules/ROOT/pages/master/1.adoc b/CN/modules/ROOT/pages/master/1.adoc deleted file mode 100644 index 4ef31d6b..00000000 --- a/CN/modules/ROOT/pages/master/1.adoc +++ /dev/null @@ -1,204 +0,0 @@ -:sectnums: -:sectnumlevels: 5 - - -== 版本概览 - -[*发布日期:2025 年 11 月 25 日*] - -IvorySQL 5.0 基于 PostgreSQL 18.0,带来更强的 Oracle 兼容能力、PL/iSQL 增强以及全新的全球化特性,同时对打包、自动化和工具链进行全面更新。 -有关完整更新列表,请访问我们的 https://docs.ivorysql.org/[文档站点]。 - -== 增强内容 - -- PostgreSQL 18.0 - -1. 新增异步 I/O(AIO)子系统,可提升顺序扫描、位图堆扫描、vacuum 等操作的性能。 -2. pg_upgrade 现在会保留优化器统计信息。 -3. 支持 "skip scan" 查找,使多列 B-tree 索引能够在更多场景下使用。 -4. 提供用于生成按时间排序 UUID 的 uuidv7() 函数。 -5. 支持虚拟生成列(在读取时计算值),并将其设为生成列的默认模式。 -6. 增加 OAuth 认证能力。 -7. 在 INSERT、UPDATE、DELETE 和 MERGE 的 RETURNING 子句中支持 OLD 和 NEW。 -8. 对 PRIMARY KEY、UNIQUE 与 FOREIGN KEY 引入时间区间约束。 - -更多细节请参阅 https://www.postgresql.org/docs/release/18.0/[PostgreSQL 18.0 发布说明]。 - -== 新特性 -=== 新增21 项 Oracle 兼容能力 - -- Oracle 兼容 ROWID:Feature https://github.com/IvorySQL/IvorySQL/issues/126[#126] + - 让 IvorySQL 行标识符与 Oracle 语义保持一致,便于跨数据库工具协同。 - -- PL/iSQL CALL 调用语法:Feature https://github.com/IvorySQL/IvorySQL/issues/764[#764] + - 新增 Oracle 风格的 `CALL` 入口,实现存储过程一致的调用体验。 - -- PL/iSQL `%ROWTYPE`:Feature https://github.com/IvorySQL/IvorySQL/issues/765[#765] + - 允许变量复用整张表或游标行的结构,便于紧凑编写 PL/iSQL。 - -- PL/iSQL `%TYPE`:Feature https://github.com/IvorySQL/IvorySQL/issues/766[#766] + - 支持变量继承既有列或变量的类型,降低类型漂移风险。 - -- 区分大小写兼容开关:Feature https://github.com/IvorySQL/IvorySQL/issues/767[#767] + - 在需要时可保留标识符大小写,以匹配 Oracle 行为。 - -- NLS 参数兼容性:Feature https://github.com/IvorySQL/IvorySQL/issues/768[#768] + - 支持 `NLS_DATE_FORMAT`、`NLS_TIMESTAMP_FORMAT` 等 Oracle 风格 NLS 设置。 - -- 空字符串转 NULL:Feature https://github.com/IvorySQL/IvorySQL/issues/769[#769] + - 将长度为零的字符串转换为 NULL,以遵循 Oracle 的兼容规则。 - -- 解析器切换能力:Feature https://github.com/IvorySQL/IvorySQL/issues/770[#770] + - 可在 Oracle 与 PostgreSQL 解析器之间切换,实现会话级灵活性。 - -- GB18030 数据库编码:Feature https://github.com/IvorySQL/IvorySQL/issues/771[#771] + - 为中国市场提供 GB18030 初始化和创建数据库选项。 - -- Oracle 兼容 `SYS_GUID`:Feature https://github.com/IvorySQL/IvorySQL/issues/773[#773] + - 实现 Oracle `SYS_GUID` 函数,生成基于 RAW 的 GUID。 - -- Oracle 兼容 `SYS_CONTEXT`:Feature https://github.com/IvorySQL/IvorySQL/issues/774[#774] + - 提供 Oracle `SYS_CONTEXT` API,用于查询会话与环境元数据。 - -- Oracle 兼容 `USERENV`:Feature https://github.com/IvorySQL/IvorySQL/issues/775[#775] + - 引入 `USERENV` 函数,使会话可检查 Oracle 风格的上下文信息。 - -- Oracle 兼容函数语法:Feature https://github.com/IvorySQL/IvorySQL/issues/776[#776] + - 支持 EDITIONABLE/NONEDITIONABLE、`RETURN`、`IS`、`OUT ... NOCOPY` 等 Oracle 结构。 - -- Oracle 兼容过程语法:Feature https://github.com/IvorySQL/IvorySQL/issues/777[#777] + - 支持包含 Oracle 选项的过程 DDL、EXEC 调用以及 ALTER PROCEDURE。 - -- libpq OUT 参数传递:Feature https://github.com/IvorySQL/IvorySQL/issues/778[#778] + - 扩展客户端协议,使 OUT 参数可像 OCI 一样被消费。 - -- 过程 OUT 参数:Feature https://github.com/IvorySQL/IvorySQL/issues/779[#779] + - 存储过程现在可按 Oracle 约定声明 IN、OUT、IN OUT 模式。 - -- 函数 OUT 参数:Feature https://github.com/IvorySQL/IvorySQL/issues/780[#780] + - 函数支持 Oracle 风格 OUT(含 IN OUT)参数。 - -- 嵌套子程序:Feature https://github.com/IvorySQL/IvorySQL/issues/781[#781] + - 允许在子程序内部定义函数或过程,并支持重载。 - -- Oracle 兼容 `INSTR`:Feature https://github.com/IvorySQL/IvorySQL/issues/782[#782] + - 与 Oracle `INSTR` 行为保持一致,覆盖子串搜索与位置判断。 - -- Oracle 兼容 FORCE VIEW:Feature https://github.com/IvorySQL/IvorySQL/issues/783[#783] + - 允许在引用对象尚未存在时创建视图,重现 Oracle FORCE 选项。 - -- Oracle 兼容 LIKE 运算符:Feature https://github.com/IvorySQL/IvorySQL/issues/784[#784] + - 对齐 Oracle 的通配符语义,确保匹配行为可预测。 - -=== 在线体验与多平台发行包 - -- 在线体验:IvorySQL v5.0:Feature https://github.com/IvorySQL/IvorySQL/issues/887[#887] + - 上线交互式浏览器环境,用户可实时体验与评估 IvorySQL v5.0,无需安装。 - -- 全平台打包:Feature https://github.com/IvorySQL/IvorySQL/issues/949[#949] + - 为 X86、ARM、MIPS、龙芯架构等平台提供多架构安装介质。 - -=== 云原生与容器化 - -- 容器化部署支持(Docker Compose & Docker Swarm): - 支持在 Docker Swarm 与 Docker Compose 中部署单实例数据库与高可用集群。 - -- 容器化部署支持(Kubernetes 基础版): - 使用 Helm 在 Kubernetes(K8S)中部署单实例数据库与高可用集群。 - -- 发布 IvorySQL Operator v5(Kubernetes 进阶版): - Operator v5 适配 IvorySQL v5.0,并同步升级系统组件版本与数据库扩展版本。 - -- 发布 IvorySQL Cloud v5(统一全生命周期与可视化控制平面): - 提供可视化托管控制平面,覆盖订阅、全生命周期编排以及生态集成。 - -=== 新增 10 个 PostgreSQL 扩展 - -- pg_cron:Feature https://github.com/IvorySQL/IvorySQL/issues/882[#882] + - 通过 pg_cron 集成在数据库层内执行计划任务。 - -- pgAudit:Feature https://github.com/IvorySQL/IvorySQL/issues/929[#929] + - 借助 PostgreSQL 标准日志能力输出详尽的会话 / 对象审计记录。 - -- PostGIS:Feature https://github.com/IvorySQL/IvorySQL/issues/880[#880] + - 提供空间数据处理与地理分析能力。 - -- pgRouting:Feature https://github.com/IvorySQL/IvorySQL/issues/881[#881] + - 引入网络与路径分析能力。 - -- PGroonga:Feature https://github.com/IvorySQL/IvorySQL/issues/879[#879] + - 增强全文检索。 - -- ddlx:Feature https://github.com/IvorySQL/IvorySQL/issues/877[#877] + - 支持 ddlx,便于高级模式洞察与自动化 DDL 生成。 - -- pgsql-http:Feature https://github.com/IvorySQL/IvorySQL/issues/883[#883] + - 允许数据库内部发起 HTTP/HTTPS 请求,实现与外部 Web 服务的无缝通信。 - -- system_stats:Feature https://github.com/IvorySQL/IvorySQL/issues/946[#946] + - 通过 system_stats 提供系统级统计信息。 - -- plpgsql_check:Feature https://github.com/IvorySQL/IvorySQL/issues/915[#915] + - 在运行前对 PL/pgSQL 函数做静态分析,定位错误、警告与潜在问题。 - -- pgvector:Feature https://github.com/IvorySQL/IvorySQL/issues/878[#878] + - 融合 pgvector,为 AI/ML 工作负载提供原生向量相似度检索。 - -== 缺陷修复 - -- 修复 `unused_oids` 与 `duplicate_oids` 目录工具,使头文件扫描能准确检测冲突且无误报:Issue https://github.com/IvorySQL/IvorySQL/issues/841[#841] -- 为 `libpq/ivytest` 产物新增 `.gitignore`,避免生成的二进制与日志污染开发树:Issue https://github.com/IvorySQL/IvorySQL/issues/843[#843] -- 扩展 GitHub 工作流回归测试,覆盖 `--with-libnuma` 配置,防止未来在启用 NUMA 的主机上出问题:Issue https://github.com/IvorySQL/IvorySQL/issues/869[#869] -- 让 `psql` 用户可以通过 `\h create package` 获取 CREATE PACKAGE 语法帮助,补齐 PL/iSQL 包的 CLI 文档:Issue https://github.com/IvorySQL/IvorySQL/issues/936[#936] -- 排除 MainLoop 悬空指针引发的并发压力下间歇性段错误:Issue https://github.com/IvorySQL/IvorySQL/issues/898[#898] -- 修复 `oracle_test/modules/*/sql` 的测试框架假设,让 Oracle 兼容测试套件再次端到端运行:Issue https://github.com/IvorySQL/IvorySQL/issues/897[#897] -- 更新 `README.md` 与 `README_CN.md`,同步 IvorySQL v5 特性、打包与快速上手信息:Issue https://github.com/IvorySQL/IvorySQL/issues/896[#896] -- 更正全局唯一索引的强制机制,使相关回归测试在所有支持平台上稳定通过:Issue https://github.com/IvorySQL/IvorySQL/issues/894[#894] - -== 源码仓库 - -IvorySQL 的主要代码仓库: - -- IvorySQL 数据库源码:https://github.com/IvorySQL/IvorySQL -- IvorySQL 官网:https://github.com/IvorySQL/Ivory-www -- IvorySQL 文档:https://github.com/IvorySQL/IvorySQL-docs -- IvorySQL Docker:https://github.com/IvorySQL/docker_library - -== 贡献者名单 -以下人员(按字母顺序)作为补丁作者、提交者、审阅者、测试者或问题报告者,为本次发布做出了贡献。 - -* ccwxl -* Cédric Villemain -* elodiefb -* Grant Zhou -* Imran Zaheer -* luss -* Martin Gerhardy -* msdnchina -* omstack -* otegami -* rophy -* shlei6067 -* sjw1933 -* Yasir Hussain Shah -* 初少林 -* 崇鹏豪 -* 高雪玉 -* 矫顺田 -* 类延良 -* 李苑 -* 梁翔宇 -* 刘晓辉 -* 吕新杰 -* 牛世继 -* 彭冲 -* 潘振浩 -* 石卓妍 -* 隋戈 -* 陶郑 -* 童水森 -* 王硕 -* 薛晓刚 -* 严少安 -* 杨世华 -* 赵法威 \ No newline at end of file diff --git a/CN/modules/ROOT/pages/master/5.0.adoc b/CN/modules/ROOT/pages/master/5.0.adoc deleted file mode 100644 index 4fe9f8b5..00000000 --- a/CN/modules/ROOT/pages/master/5.0.adoc +++ /dev/null @@ -1,28 +0,0 @@ -:sectnums: -:sectnumlevels: 5 - - -[discrete] -== IvorySQL生态插件适配列表 - -IvorySQL 作为一款兼容 Oracle 且基于 PostgreSQL 的高级开源数据库,具备强大的扩展能力,支持丰富的生态系统插件。这些插件可以帮助用户在不同场景下增强数据库功能,包括地理信息处理、向量检索、全文搜索、数据定义提取和路径规划等。以下是当前 IvorySQL 官方兼容和支持的主要插件列表: - - -[cols="1,2,1,3,3"] -|==== -|*序号*|*插件名称*|*版本*|*功能描述*|*适用场景* -| 1 | xref:master/5.1.adoc[postgis] | 3.5.4 | 为 IvorySQL 提供地理空间数据支持,包括空间索引、空间函数和地理对象存储 | 地理信息系统(GIS)、地图服务、位置数据分析 -| 2 | xref:master/5.2.adoc[pgvector] | 0.8.1 | 支持向量相似性搜索,可用于存储和检索高维向量数据| AI 应用、图像检索、推荐系统、语义搜索 -| 3 | xref:master/5.3.adoc[pgddl (DDL Extractor)] | 0.31 | 提取数据库中的 DDL(数据定义语言)语句,便于版本管理和迁移 | 数据库版本控制、CI/CD 集成、结构比对与同步 -| 4 | xref:master/5.4.adoc[pg_cron]​ | 1.6.0 | 提供数据库内部的定时任务调度功能,支持定期执行SQL语句 | 数据清理、定期统计、自动化维护任务 -| 5 | xref:master/5.5.adoc[pgsql-http]​ | 1.7.0 | 允许在SQL中发起HTTP请求,与外部Web服务进行交互 | 数据采集、API集成、微服务调用 -| 6 | xref:master/5.6.adoc[plpgsql_check] | 2.8 | 提供PL/pgSQL代码的静态分析功能,可在开发阶段发现潜在错误 | 存储过程开发、代码质量检查、调试优化 -| 7 | xref:master/5.7.adoc[pgroonga] | 4.0.4 | 提供​非英语语言全文搜索功能,满足高性能应用的需求 | 中日韩等语言的全文搜索功能 -| 8 | xref:master/5.8.adoc[pgaudit] | 18.0 | 提供细粒度的审计功能,记录数据库操作日志,便于安全审计和合规性检查 | 数据库安全审计、合规性检查、审计报告生成 -| 9 | xref:master/5.9.adoc[pgrouting] | 3.8.0 | 提供地理空间数据的路由计算功能,支持多种算法和数据格式 | 地理空间分析、路径规划、物流优化 -| 10 | xref:master/5.10.adoc[system_stats] | 3.2 | 提供用于访问系统级统计信息的函数 | 系统监控 -|==== - -这些插件均经过 IvorySQL 团队的测试和适配,确保在 IvorySQL 环境下稳定运行。用户可以根据业务需求选择合适的插件,进一步提升数据库系统的能力和灵活性。 - -我们也将持续扩展和丰富 IvorySQL 的插件生态,欢迎社区开发者提交新的插件适配建议或代码贡献。如需了解更多每个插件的详细使用方法和最新兼容版本,请参阅各插件对应的文档章节。 diff --git a/CN/modules/ROOT/pages/master/cpu_arch_adp.adoc b/CN/modules/ROOT/pages/master/cpu_arch_adp.adoc deleted file mode 100644 index e929a549..00000000 --- a/CN/modules/ROOT/pages/master/cpu_arch_adp.adoc +++ /dev/null @@ -1,15 +0,0 @@ - -:sectnums: -:sectnumlevels: 5 - -= **芯片架构适配** - -IvorySQL适配认证如下CPU架构: -[cols="8h,~,~,~"] -|==== -| 序号 | 架构名称 | 适配品牌 | 全平台介质包下载 -| 1 | x86_64 | Intel、AMD、兆芯、海光 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.amd64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.x86_64.rpm[rpm] -| 2 | aarch64 | 飞腾、鲲鹏 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.arm64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.aarch64.rpm[rpm] -| 3 | mips64el| 龙芯3000,龙芯4000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.mips64el.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.mips64el.rpm[rpm] -| 4 | loongarch64 | 龙芯5000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251118.loongarch64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251118.loongarch64.rpm[rpm] -|==== diff --git a/CN/modules/ROOT/pages/v5.1/1.adoc b/CN/modules/ROOT/pages/v5.1/1.adoc new file mode 100644 index 00000000..231a4513 --- /dev/null +++ b/CN/modules/ROOT/pages/v5.1/1.adoc @@ -0,0 +1,82 @@ +:sectnums: +:sectnumlevels: 5 + + +== 版本概览 + +[*发布日期:2025 年 12 月 18 日*] + +IvorySQL 5.1 基于 PostgreSQL 18.1 构建,包含多项错误修复。有关更新的完整列表,请访问我们的 https://docs.ivorysql.org/[文档站点]。 + +== 增强内容 + +- PostgreSQL 18.1 + +1. 执行 CREATE STATISTICS 时检查 schema 上的 CREATE 权限。 +2. 避免 libpq 中分配内存计算时发生整数溢出。 +3. SQL/JSON 函数(如 JSON_VALUE)的 DEFAULT 子句中包含 COLLATE 表达式时,防止出现“未识别的节点类型”错误。 +4. 避免在包含分组集且不含变量的 HAVING 子句中进行不正确的优化。 +5. 在哈希右半连接中禁用并行处理。 +6. 创建有序追加执行计划时避免可能的除零错误。 +7. 修复规划器在处理“支持有序访问但不支持仅索引扫描的索引类型”时的失败问题。 + +更多详情,请参阅 https://www.postgresql.org/docs/release/18.1/[PostgreSQL 18.1 发布说明]。 + +== 新特性 + +- 升级至 PG 18.1 内核:Feature https://github.com/IvorySQL/IvorySQL/pull/1004[#1004] + + PostgreSQL 内核已升级至 18.1 版本。 + +- http://trial.ivorysql.org/[在线体验]:IvorySQL 5.1:Feature https://github.com/IvorySQL/ivorysql-wasm/pull/6[#6] + + 上线交互式浏览器环境,用户可实时体验与评估 IvorySQL v5.1,无需安装。 + +- 全平台打包:Feature https://github.com/IvorySQL/IvorySQL/issues/1136[#1136] + + 为 X86、ARM、MIPS、龙芯架构等平台提供多架构安装介质。 + +- 容器化部署支持 + + 支持通过 Docker Compose、Podman、Swarm、Helm 以及 IvorySQL 5.1 Operator 一键部署单机或高可用的 IvorySQL 5.1 集群。 + +- 发布 IvorySQL Cloud v5.1(统一全生命周期与可视化控制平台) + + 提供可视化托管控制平台,覆盖订阅、端到端的全生命周期编排以及生态集成。 + +- PostgreSQL Extensions + + 新增支持 10 个 PostgreSQL 扩展:pg_cron、pgAudit、PostGIS、pgRouting、PGroonga、ddlx、pgsql-http、system_stats、plpgsql_check、pgvector。 + +== 缺陷修复 + +- 清除编译警告:Issue https://github.com/IvorySQL/IvorySQL/issues/996[#996] +- PL/iSQL 解析器拒绝在 SELECT INTO 表达式中使用括号:Issue https://github.com/IvorySQL/IvorySQL/issues/981[#981] +- 源码安装过程中提示缺少 uuid-ossp:Issue https://github.com/IvorySQL/ivorysql_docs/pull/198[#198] + +== 源码仓库 + +IvorySQL 的主要代码仓库: + +- IvorySQL 数据库源码:https://github.com/IvorySQL/IvorySQL +- IvorySQL 官网:https://github.com/IvorySQL/Ivory-www +- IvorySQL 文档:https://github.com/IvorySQL/IvorySQL-docs +- IvorySQL Docker:https://github.com/IvorySQL/docker_library + +== 贡献者名单 +以下人员(按字母顺序)作为补丁作者、提交者、审阅者、测试者或问题报告者,为本次发布做出了贡献。 + +* Amberwww1 +* Cédric Villemain +* Grant Zhou +* Rophy Tsai +* Yasir Hussain Shah +* 高雪玉 +* 矫顺田 +* 李苑 +* 梁翔宇 +* 刘晓辉 +* 吕新杰 +* 牛世继 +* 潘振浩 +* 石卓妍 +* 隋戈 +* 陶郑 +* 王志斌 +* 杨世华 +* 赵法威 +* 张哲 \ No newline at end of file diff --git a/CN/modules/ROOT/pages/master/10.adoc b/CN/modules/ROOT/pages/v5.1/10.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/10.adoc rename to CN/modules/ROOT/pages/v5.1/10.adoc diff --git a/CN/modules/ROOT/pages/master/100.adoc b/CN/modules/ROOT/pages/v5.1/100.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/100.adoc rename to CN/modules/ROOT/pages/v5.1/100.adoc diff --git a/CN/modules/ROOT/pages/master/110.adoc b/CN/modules/ROOT/pages/v5.1/110.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/110.adoc rename to CN/modules/ROOT/pages/v5.1/110.adoc diff --git a/CN/modules/ROOT/pages/master/2.adoc b/CN/modules/ROOT/pages/v5.1/2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/2.adoc rename to CN/modules/ROOT/pages/v5.1/2.adoc diff --git a/CN/modules/ROOT/pages/master/23.adoc b/CN/modules/ROOT/pages/v5.1/23.adoc similarity index 98% rename from CN/modules/ROOT/pages/master/23.adoc rename to CN/modules/ROOT/pages/v5.1/23.adoc index 908c1958..27173ae1 100644 --- a/CN/modules/ROOT/pages/master/23.adoc +++ b/CN/modules/ROOT/pages/v5.1/23.adoc @@ -29,7 +29,7 @@ IvorySQL由一个核心开发团队维护,该团队拥有对GitHub上的IvoryS == **贡献者指南** -在贡献之前,我们需要了解下IvorySQL目前的版本以及文档的版本。目前,我们维护着5.0等版本,我们的版本紧跟PG的更新步伐,贡献之前请更新至最新版本。之后我们需要细心浏览一下贡献的样式风格,熟悉代码贡献风格、提Issue样式、拉取PR标题样式、代码注释样式、文档贡献样式、文章贡献样式,这可以帮助您尽快成为IvorySQL的贡献者奥~。 +在贡献之前,我们需要了解下IvorySQL目前的版本以及文档的版本。目前,我们维护着{ivorysql-version}等版本,我们的版本紧跟PG的更新步伐,贡献之前请更新至最新版本。之后我们需要细心浏览一下贡献的样式风格,熟悉代码贡献风格、提Issue样式、拉取PR标题样式、代码注释样式、文档贡献样式、文章贡献样式,这可以帮助您尽快成为IvorySQL的贡献者奥~。 === 贡献前的准备 diff --git a/CN/modules/ROOT/pages/master/3.1.adoc b/CN/modules/ROOT/pages/v5.1/3.1.adoc similarity index 84% rename from CN/modules/ROOT/pages/master/3.1.adoc rename to CN/modules/ROOT/pages/v5.1/3.1.adoc index 3ae85bcf..f6d4f775 100644 --- a/CN/modules/ROOT/pages/master/3.1.adoc +++ b/CN/modules/ROOT/pages/v5.1/3.1.adoc @@ -42,6 +42,7 @@ https://www.ionos.com/help/server-cloud-infrastructure/server-administration/cre + 创建或编辑IvorySQL yum源配置文件/etc/yum.repos.d/ivorysql.repo +[source,bash,subs="attributes"] ``` vim /etc/yum.repos.d/ivorysql.repo [ivorysql5] @@ -51,12 +52,13 @@ enabled=1 gpgcheck=0 ``` 保存退出后,安装IvorySQL5 +[source,bash,subs="attributes"] ``` -$ sudo dnf install -y ivorysql5-5.0 +$ sudo dnf install -y ivorysql5-{ivorysql-version} ``` .... - 正确安装后,数据库将被安装在/usr/ivory-5/路径下的IvorySQL-version(如:IvorySQL-5.0)文件夹内 + 正确安装后,数据库将被安装在/usr/ivory-5/路径下的IvorySQL-version(如:IvorySQL-{ivorysql-version})文件夹内 .... 执行以下命令为ivorysql用户赋权: @@ -112,28 +114,35 @@ ivorysql 3238 1551 0 20:35 pts/0 00:00:00 grep --color=auto postgres === docker方式运行 ** 从Docker Hub上获取IvorySQL镜像 + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 运行IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 查看IvorySQL容器运行是否成功 + +[source,bash,subs="attributes"] ``` $ docker ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -6faa2d0ed705 ivorysql:5.0-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql +6faa2d0ed705 ivorysql:{ivorysql-version}-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql ``` == 数据库连接 psql连接数据库: +[source,bash,subs="attributes"] ``` $ psql -d -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# @@ -148,4 +157,4 @@ TIP: Docker运行IvorySQL时,需要添加额外参数,如 psql -d ivorysql - 现在可以开始使用IvorySQL啦!就是这么简单! -想要获得更多安装方式,请参考xref:master/4.1.adoc[安装指南] +想要获得更多安装方式,请参考xref:v{ivorysql-version}/4.1.adoc[安装指南] diff --git a/CN/modules/ROOT/pages/master/3.2.adoc b/CN/modules/ROOT/pages/v5.1/3.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/3.2.adoc rename to CN/modules/ROOT/pages/v5.1/3.2.adoc diff --git a/CN/modules/ROOT/pages/master/3.3.adoc b/CN/modules/ROOT/pages/v5.1/3.3.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/3.3.adoc rename to CN/modules/ROOT/pages/v5.1/3.3.adoc diff --git a/CN/modules/ROOT/pages/master/33.adoc b/CN/modules/ROOT/pages/v5.1/33.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/33.adoc rename to CN/modules/ROOT/pages/v5.1/33.adoc diff --git a/CN/modules/ROOT/pages/master/4.1.adoc b/CN/modules/ROOT/pages/v5.1/4.1.adoc similarity index 85% rename from CN/modules/ROOT/pages/master/4.1.adoc rename to CN/modules/ROOT/pages/v5.1/4.1.adoc index 3818f811..83390f25 100644 --- a/CN/modules/ROOT/pages/master/4.1.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.1.adoc @@ -14,7 +14,7 @@ IvorySQL安装方式包括以下5种: - <<源码安装>> - <> -本章将详细介绍每种方式的安装、运行及卸载过程。想要更快获得IvorySQL,请参阅xref:master/3.1.adoc#快速开始[快速开始]。 +本章将详细介绍每种方式的安装、运行及卸载过程。想要更快获得IvorySQL,请参阅xref:v{ivorysql-version}/3.1.adoc#快速开始[快速开始]。 同样,安装前请先创建一个用户,并赋予其root权限,安装、使用和卸载均以该用户执行。这里以ivorysql用户为例。 @@ -31,21 +31,26 @@ enabled=1 gpgcheck=0 ``` 保存退出后,安装IvorySQL5 +[source,bash,subs="attributes"] ``` -$ sudo dnf install -y ivorysql5-5.0 +$ sudo dnf install -y ivorysql5-{ivorysql-version} ``` [[docker安装]] == docker安装 ** 从Docker Hub上获取IvorySQL镜像 + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 运行IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` -e参数说明 |==== @@ -72,8 +77,10 @@ $ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d $ sudo dnf install -y lz4 libicu libxslt python3 ``` ** 获取rpm包 + +[source,bash,subs="attributes"] ``` -$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.x86_64.rpm +$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-9d890e9-20251120.x86_64.rpm ``` ** 安装rpm包 @@ -89,8 +96,14 @@ $ sudo yum --disablerepo=* localinstall *.rpm == 源码安装 ** 安装依赖 ``` -$ sudo dnf install -y bison readline-devel zlib-devel openssl-devel +# CentOS +$ sudo dnf install -y bison readline-devel zlib-devel openssl-devel uuid-devel $ sudo dnf groupinstall -y 'Development Tools' + +# Ubuntu +$ sudo apt install -y bison libreadline-dev zlib1g-dev libssl-dev +$ sudo apt install -y build-essential +$ sudo apt install -y pkg-config uuid-dev ``` ** 获取IvorySQL源代码 ``` @@ -137,13 +150,17 @@ $ sudo apt -y install pkg-config libreadline-dev libicu-dev libldap2-dev uuid-de ``` ** 获取deb包 + +[source,bash,subs="attributes"] ``` -$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-a50789d-20250304.amd64.deb +$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb ``` ** 安装deb包 + +[source,bash,subs="attributes"] ``` -$ sudo dpkg -i IvorySQL-5.0-a50789d-20250304.amd64.deb +$ sudo dpkg -i IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb ``` 数据库将被安装在/usr/ivory-5/路径下。 @@ -207,9 +224,10 @@ ivorysql 130445 130274 0 02:45 pts/1 00:00:00 grep --color=auto postgres == 数据库连接 psql连接数据库: +[source,bash,subs="attributes"] ``` $ psql -d -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# @@ -239,10 +257,12 @@ $ sudo dnf remove -y ivorysql5-5.0 === docker安装的卸载 执行以下命令,使IvorySQL容器停止运行,并删除IvorySQL容器和镜像: + +[source,bash,subs="attributes"] ``` $ docker stop ivorysql $ docker rm ivorysql -$ docker rmi ivorysql/ivorysql:5.0-ubi8 +$ docker rmi ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` === rpm安装的卸载 @@ -265,7 +285,9 @@ $ sudo rm -rf /usr/ivory-5 === deb安装的卸载 执行以下命令卸载数据库并清理文件夹: + +[source,bash,subs="attributes"] ``` -$ sudo dpkg -P IvorySQL-5.0 +$ sudo dpkg -P IvorySQL-{ivorysql-version} $ sudo rm -rf /usr/ivory-5 ``` diff --git a/CN/modules/ROOT/pages/master/4.2.adoc b/CN/modules/ROOT/pages/v5.1/4.2.adoc similarity index 91% rename from CN/modules/ROOT/pages/master/4.2.adoc rename to CN/modules/ROOT/pages/v5.1/4.2.adoc index 67a2ec83..e414369d 100644 --- a/CN/modules/ROOT/pages/master/4.2.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.2.adoc @@ -8,9 +8,9 @@ == 主节点 === 安装并启动数据库 -yum源快速安装数据库,请参考xref:master/3.1.adoc#从yum源安装ivorysql数据库[从yum源安装ivorysql数据库]。 +yum源快速安装数据库,请参考xref:v{ivorysql-version}/3.1.adoc#从yum源安装ivorysql数据库[从yum源安装ivorysql数据库]。 -想要获取更多安装方式,请参考xref:master/4.1.adoc[安装指南]。 +想要获取更多安装方式,请参考xref:v{ivorysql-version}/4.1.adoc[安装指南]。 [NOTE] 主节点数据库需要安装并**启动** @@ -56,9 +56,9 @@ $ pg_ctl restart == 备节点 === 安装数据库 -Yum源快速安装数据库,请参考xref:master/3.1.adoc#从yum源安装ivorysql数据库[从yum源安装ivorysql数据库]。 +Yum源快速安装数据库,请参考xref:v{ivorysql-version}/3.1.adoc#从yum源安装ivorysql数据库[从yum源安装ivorysql数据库]。 -想要获取更多安装方式,请参考xref:master/4.1.adoc[安装指南]。 +想要获取更多安装方式,请参考xref:v{ivorysql-version}/4.1.adoc[安装指南]。 [NOTE] 备节点数据库只需要安装,**不需要启动** @@ -116,9 +116,10 @@ ivorysql 6567 6139 0 21:54 ? 00:00:00 postgres: walreceiver streaming ... ``` 在主节点上psql连接数据库,并查看集群状态: +[source,bash,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# select * from pg_stat_replication; @@ -137,9 +138,10 @@ xmin | state | sent_lsn | write_lsn | flush_lsn | replay_lsn | write_lag | === 使用集群 集群中所有的写操作均在主节点执行,读操作则主备节点都可以执行。主节点的数据通过流复制同步到备节点。主节点写操作的结果在任何一个备节点都能够查询到。 例如,在主节点创建一个新的数据库test,并在主节点进行查询: +[source,bash,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# create database test; @@ -157,9 +159,10 @@ ivorysql=# \l (4 rows) ``` 在备节点查询: +[source,bash,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# \l diff --git a/CN/modules/ROOT/pages/master/4.3.adoc b/CN/modules/ROOT/pages/v5.1/4.3.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/4.3.adoc rename to CN/modules/ROOT/pages/v5.1/4.3.adoc diff --git a/CN/modules/ROOT/pages/master/4.4.adoc b/CN/modules/ROOT/pages/v5.1/4.4.adoc similarity index 99% rename from CN/modules/ROOT/pages/master/4.4.adoc rename to CN/modules/ROOT/pages/v5.1/4.4.adoc index 2eb6f51e..c1545032 100644 --- a/CN/modules/ROOT/pages/master/4.4.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.4.adoc @@ -88,7 +88,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 === 利用pg_upgrade 工具进行升级 -pg_upgrade 工具是PostgreSQL 内置的跨版本升级工具,能够对数据库就地升级,不需要执行导出和导入操作。IvorySQL源自于PG,因此也能够使用pg_upgrade 工具进行大版本升级。 下面简要介绍一下CentOS8平台上如何使用 pg_upgrade 将IvorySQL升级到最新的5.0版本。 +pg_upgrade 工具是PostgreSQL 内置的跨版本升级工具,能够对数据库就地升级,不需要执行导出和导入操作。IvorySQL源自于PG,因此也能够使用pg_upgrade 工具进行大版本升级。 下面简要介绍一下CentOS8平台上如何使用 pg_upgrade 将IvorySQL升级到最新的{ivorysql-version}版本。 pg_upgrade 提供了升级前的兼容性检查(-c 或者 --check 选项)功能,可以发现插件、数据类型不兼容等问题。如果指定了--link 选项,新版本服务可以直接使用原有的数据库文件而不需要执行复制,通常可以在几分钟内完成升级操作。 @@ -107,23 +107,26 @@ pg_upgrade 提供了升级前的兼容性检查(-c 或者 --check 选项)功 ``` /usr/ivory-4/bin/pg_ctl -D ./data stop ``` -然后安装新版本的IvorySQL5.0数据库: +然后安装新版本的IvorySQL{ivorysql-version}数据库: +[source,bash,subs="attributes"] ``` -dnf install -y ivorysql5-5.0 +dnf install -y ivorysql5-{ivorysql-version} ``` -初始化新版IvorySQL5.0数据目录: +初始化新版IvorySQL{ivorysql-version}数据目录: ``` /usr/ivory-5/bin/initdb -D ./data ``` 检查版本兼容性: +[source,bash,subs="attributes"] ``` -/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/5.0/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ --check +/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/{ivorysql-version}/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ --check ``` 最后出现 “Clusters are compatible” 表明两个版本之间的数据不存在兼容性问题,可以进行升级。 正式升级: +[source,bash,subs="attributes"] ``` -/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/5.0/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ +/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/{ivorysql-version}/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ ``` 看到 Upgrade Complete 说明升级已经顺利完成。 @@ -153,7 +156,7 @@ pg_upgrade https://www.postgresql.org/docs/current/pgupgrade.html[文档]概述 == 管理IvorySQL版本 -IvorySQL基于PostgreSQL开发,版本更新频率与PostgreSQL版本更新频率保持一致,每年更新一个大版本,每季度更新一个小版本。IvorySQL目前发布的版本有1.0到5.0,分别基于PostgreSQL 14.0到18.0进行开发,最新版本为IvorySQL 5.0,基于PostgreSQL 18.0进行开发。IvorySQL 的所有版本全部都做到了向下兼容。相关版本特性可以查看 https://www.ivorysql.org/zh-CN/releases-page[官网]。 +IvorySQL基于PostgreSQL开发,版本更新频率与PostgreSQL版本更新频率保持一致,每年更新一个大版本,每季度更新一个小版本。IvorySQL目前发布的版本有1.0到{ivorysql-version},分别基于PostgreSQL 14.0到{pg-version}进行开发,最新版本为IvorySQL {ivorysql-version},基于PostgreSQL {pg-version}进行开发。IvorySQL 的所有版本全部都做到了向下兼容。相关版本特性可以查看 https://www.ivorysql.org/zh-CN/releases-page[官网]。 == 管理IvorySQL数据库访问 diff --git a/CN/modules/ROOT/pages/master/4.5.adoc b/CN/modules/ROOT/pages/v5.1/4.5.adoc similarity index 99% rename from CN/modules/ROOT/pages/master/4.5.adoc rename to CN/modules/ROOT/pages/v5.1/4.5.adoc index bcb6ddd0..9c7c0ee9 100644 --- a/CN/modules/ROOT/pages/master/4.5.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.5.adoc @@ -440,6 +440,7 @@ Fixing function calls in output files... 创建ORCL 数据库 +[source,bash,subs="attributes"] ``` # su - ivorysql @@ -449,7 +450,7 @@ $ createdb orcl $ psql -psql (18.0) +psql ({pg-version}) Type "help" for help. @@ -475,10 +476,11 @@ ivorysql=# 创建SH,HR,SCOTT 用户: +[source,bash,subs="attributes"] ``` $ psql orcl -psql (18.0) +psql ({pg-version}) Type "help" for help. diff --git a/CN/modules/ROOT/pages/master/4.6.1.adoc b/CN/modules/ROOT/pages/v5.1/4.6.1.adoc similarity index 95% rename from CN/modules/ROOT/pages/master/4.6.1.adoc rename to CN/modules/ROOT/pages/v5.1/4.6.1.adoc index 1f914538..8509b115 100644 --- a/CN/modules/ROOT/pages/master/4.6.1.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.6.1.adoc @@ -51,6 +51,7 @@ statefulset.apps/ivorysql 1/1 2m39s ``` psql连接IvorySQL的PG端口 +[source,bash,subs="attributes"] ``` [root@k8s-master single]# psql -U ivorysql -p 32106 -h 127.0.0.1 -d ivorysql Password for user ivorysql: @@ -58,7 +59,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -71,6 +72,7 @@ ivorysql=# exit ``` psql连接IvorySQL的Oracle端口 +[source,bash,subs="attributes"] ``` [root@k8s-master single]# psql -U ivorysql -p 31887 -h 127.0.0.1 -d ivorysql Password for user ivorysql: @@ -78,7 +80,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; diff --git a/CN/modules/ROOT/pages/master/4.6.2.adoc b/CN/modules/ROOT/pages/v5.1/4.6.2.adoc similarity index 99% rename from CN/modules/ROOT/pages/master/4.6.2.adoc rename to CN/modules/ROOT/pages/v5.1/4.6.2.adoc index f47a8945..c5ef8be2 100644 --- a/CN/modules/ROOT/pages/master/4.6.2.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.6.2.adoc @@ -221,7 +221,8 @@ Labels: my-label=value2 Annotations: my-annotation: value1 .... -NOTE: 使用默认 `ClusterIP` 类型时禁止设置 `nodePort`;该值必须在合法范围内且未被占用。此处提供的注解与标签优先级最高。若通过外部暴露 Service 并依赖 TLS 验证,需使用 IVYO 的 https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS] 功能。 +NOTE: 使用默认 `ClusterIP` 类型时禁止设置 `nodePort`;该值必须在合法范围内且未被占用。此处提供的注解与标签优先级最高。若通过外部暴露 Service 并依赖 TLS 验证,需使用 IVYO 的 +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS] 功能。 [#connect-app] === 连接应用程序 @@ -1371,7 +1372,8 @@ spec: ===== 流式备用集群 -流式备用集群依赖于通过网络到主集群的经过身份验证的连接。主集群应可通过网络访问并允许 TLS 身份验证(默认启用 TLS)。在以下清单中,我们将 `standby.enabled` 设置为 `true`,并提供了指向主集群的 `host` 和 `port`。我们还定义了 `customTLSSecret` 和 `customReplicationTLSSecret` 以提供允许备用集群向主集群进行身份验证的证书。对于这种类型的备用集群,您必须使用 https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS]: +流式备用集群依赖于通过网络到主集群的经过身份验证的连接。主集群应可通过网络访问并允许 TLS 身份验证(默认启用 TLS)。在以下清单中,我们将 `standby.enabled` 设置为 `true`,并提供了指向主集群的 `host` 和 `port`。我们还定义了 `customTLSSecret` 和 `customReplicationTLSSecret` 以提供允许备用集群向主集群进行身份验证的证书。对于这种类型的备用集群,您必须使用 +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS]: ---- apiVersion: ivory-operator.ivorysql.org/v1beta1 @@ -1814,7 +1816,8 @@ kubectl apply -k kustomize/keycloak Kubernetes 将检测到更改并开始部署新的 Keycloak Pod。完成后,Keycloak 现在将通过 PgBouncer 连接池连接到 Ivory! === TLS -IVYO 通过 TLS 部署每个集群和组件。这包括 PgBouncer 连接池。如果您使用自己的 https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS 设置],则需要在 `spec.proxy.pgBouncer.customTLSSecret` 中为 PgBouncer 提供 Secret 引用。 +IVYO 通过 TLS 部署每个集群和组件。这包括 PgBouncer 连接池。如果您使用自己的 +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[自定义 TLS 设置],则需要在 `spec.proxy.pgBouncer.customTLSSecret` 中为 PgBouncer 提供 Secret 引用。 PgBouncer 的 TLS 证书应具有与 PgBouncer Service 名称匹配的通用名称 (CN)。这是集群的名称,后缀为 `-pgbouncer`。例如,对于我们的 `hippo` 集群,这将是 `hippo-pgbouncer`。对于 `keycloakdb` 示例,它将是 `keycloakdb-pgBouncer`。 @@ -2059,7 +2062,8 @@ IVYO 会自动检测并加载对 IvorySQL 服务器和复制 Secret 内容的更 [IMPORTANT] ==== -更改 IvorySQL 证书颁发机构时,请确保同时更新 https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[`customReplicationTLSSecret`]。 +更改 IvorySQL 证书颁发机构时,请确保同时更新 +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[`customReplicationTLSSecret`]。 ==== === 更改主节点 diff --git a/CN/modules/ROOT/pages/master/4.6.3.adoc b/CN/modules/ROOT/pages/v5.1/4.6.3.adoc similarity index 91% rename from CN/modules/ROOT/pages/master/4.6.3.adoc rename to CN/modules/ROOT/pages/v5.1/4.6.3.adoc index d1b5706c..1779017a 100644 --- a/CN/modules/ROOT/pages/master/4.6.3.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.6.3.adoc @@ -65,6 +65,7 @@ fr0m9chu3ce8 ivorysql-hac_ivypatroni2 replicated 1/1 ivorysql/docke ``` psql连接数据库的Oracle端口及PG端口 +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p1521 -U ivorysql -d ivorysql Password for user ivorysql: @@ -72,7 +73,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -83,6 +84,7 @@ ivorysql=# show ivorysql.compatible_mode; ivorysql=# exit ``` +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p5432 -U ivorysql -d ivorysql Password for user ivorysql: @@ -90,7 +92,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -150,6 +152,7 @@ CONTAINER ID IMAGE COMMAND 此时,一主两备集群搭建完成 psql连接数据库的Oracle端口及PG端口 +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p1521 -U ivorysql -d ivorysql Password for user ivorysql: @@ -157,7 +160,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -168,6 +171,7 @@ ivorysql=# show ivorysql.compatible_mode; ivorysql=# exit ``` +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p5432 -U ivorysql -d ivorysql Password for user ivorysql: @@ -175,7 +179,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; diff --git a/CN/modules/ROOT/pages/master/4.6.4.adoc b/CN/modules/ROOT/pages/v5.1/4.6.4.adoc similarity index 63% rename from CN/modules/ROOT/pages/master/4.6.4.adoc rename to CN/modules/ROOT/pages/v5.1/4.6.4.adoc index 2cbbd0b5..5ff12d00 100644 --- a/CN/modules/ROOT/pages/master/4.6.4.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.6.4.adoc @@ -7,29 +7,37 @@ == docker方式运行 ** 从Docker Hub上获取IvorySQL镜像 + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 运行IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 查看IvorySQL容器运行是否成功 + +[source,bash,subs="attributes"] ``` $ docker ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -6faa2d0ed705 ivorysql:5.0-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql +6faa2d0ed705 ivorysql:{ivorysql-version}-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql ``` == podman方式运行 ** 从Docker Hub上获取IvorySQL镜像 + +[source,bash,subs="attributes"] ``` -[highgo@manager-node1 ~]$ podman pull ivorysql/ivorysql:5.0-ubi8 -✔ docker.io/ivorysql/ivorysql:5.0-ubi8 -Trying to pull docker.io/ivorysql/ivorysql:5.0-ubi8... +[highgo@manager-node1 ~]$ podman pull ivorysql/ivorysql:{ivorysql-version}-ubi8 +✔ docker.io/ivorysql/ivorysql:{ivorysql-version}-ubi8 +Trying to pull docker.io/ivorysql/ivorysql:{ivorysql-version}-ubi8... Getting image source signatures Copying blob 5885448c5c88 done | Copying blob 6c502b378234 done | @@ -49,22 +57,26 @@ Writing manifest to image destination ``` ** 运行IvorySQL + +[source,bash,subs="attributes"] ``` -$ podman run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=123456 -d ivorysql/ivorysql:5.0-ubi8 +$ podman run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=123456 -d ivorysql/ivorysql:{ivorysql-version}-ubi8 ``` ** 查看IvorySQL容器运行是否成功 + +[source,bash,subs="attributes"] ``` [highgo@manager-node1 ~]$ podman ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -368dee58d5ef docker.io/ivorysql/ivorysql:5.0-ubi8 postgres 20 seconds ago Up 20 seconds 0.0.0.0:5434->5432/tcp, 1521/tcp, 5866/tcp ivorysql +368dee58d5ef docker.io/ivorysql/ivorysql:{ivorysql-version}-ubi8 postgres 20 seconds ago Up 20 seconds 0.0.0.0:5434->5432/tcp, 1521/tcp, 5866/tcp ivorysql [highgo@manager-node1 ~]$ podman exec -it ivorysql /bin/bash [root@8cc631eb413d /]# ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL {pg-version} (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# diff --git a/CN/modules/ROOT/pages/master/4.7.1.adoc b/CN/modules/ROOT/pages/v5.1/4.7.1.adoc similarity index 98% rename from CN/modules/ROOT/pages/master/4.7.1.adoc rename to CN/modules/ROOT/pages/v5.1/4.7.1.adoc index 3c8e2b59..55120b87 100644 --- a/CN/modules/ROOT/pages/master/4.7.1.adoc +++ b/CN/modules/ROOT/pages/v5.1/4.7.1.adoc @@ -27,7 +27,7 @@ IvorySQL Cloud平台,目前支持Linux系统下的安装,以下为各部分 |后端|cloudnative-1.0-SNAPSHOT.jar |K8S集群 a| [arabic] -. docker.io/ivorysql/ivory-operator:v5.0 +. docker.io/ivorysql/ivory-operator:v{ivorysql-version} . docker.io/ivorysql/pgadmin:ubi8-9.9-5.0-1 . docker.io/ivorysql/pgbackrest:ubi8-2.56.0-5.0-1 . docker.io/ivorysql/postgres-exporter:ubi8-0.17.0-5.0-1 @@ -200,7 +200,7 @@ npm run build:prod 修改文件 -[literal] +[literal,subs="attributes"] ---- [root@cloud dist]# pwd @@ -228,7 +228,7 @@ disableNative = false dbtype = "IvorySQL" -dbversion = "5.0" +dbversion = "{ivorysql-version}" ---- === 安装部署nginx diff --git a/CN/modules/ROOT/pages/master/4.7.2.adoc b/CN/modules/ROOT/pages/v5.1/4.7.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/4.7.2.adoc rename to CN/modules/ROOT/pages/v5.1/4.7.2.adoc diff --git a/CN/modules/ROOT/pages/master/4.7.adoc b/CN/modules/ROOT/pages/v5.1/4.7.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/4.7.adoc rename to CN/modules/ROOT/pages/v5.1/4.7.adoc diff --git a/CN/modules/ROOT/pages/v5.1/5.0.adoc b/CN/modules/ROOT/pages/v5.1/5.0.adoc new file mode 100644 index 00000000..662545b8 --- /dev/null +++ b/CN/modules/ROOT/pages/v5.1/5.0.adoc @@ -0,0 +1,28 @@ +:sectnums: +:sectnumlevels: 5 + + +[discrete] +== IvorySQL生态插件适配列表 + +IvorySQL 作为一款兼容 Oracle 且基于 PostgreSQL 的高级开源数据库,具备强大的扩展能力,支持丰富的生态系统插件。这些插件可以帮助用户在不同场景下增强数据库功能,包括地理信息处理、向量检索、全文搜索、数据定义提取和路径规划等。以下是当前 IvorySQL 官方兼容和支持的主要插件列表: + + +[cols="1,2,1,3,3"] +|==== +|*序号*|*插件名称*|*版本*|*功能描述*|*适用场景* +| 1 | xref:v{ivorysql-version}/5.1.adoc[postgis] | 3.5.4 | 为 IvorySQL 提供地理空间数据支持,包括空间索引、空间函数和地理对象存储 | 地理信息系统(GIS)、地图服务、位置数据分析 +| 2 | xref:v{ivorysql-version}/5.2.adoc[pgvector] | 0.8.1 | 支持向量相似性搜索,可用于存储和检索高维向量数据| AI 应用、图像检索、推荐系统、语义搜索 +| 3 | xref:v{ivorysql-version}/5.3.adoc[pgddl (DDL Extractor)] | 0.31 | 提取数据库中的 DDL(数据定义语言)语句,便于版本管理和迁移 | 数据库版本控制、CI/CD 集成、结构比对与同步 +| 4 | xref:v{ivorysql-version}/5.4.adoc[pg_cron]​ | 1.6.0 | 提供数据库内部的定时任务调度功能,支持定期执行SQL语句 | 数据清理、定期统计、自动化维护任务 +| 5 | xref:v{ivorysql-version}/5.5.adoc[pgsql-http]​ | 1.7.0 | 允许在SQL中发起HTTP请求,与外部Web服务进行交互 | 数据采集、API集成、微服务调用 +| 6 | xref:v{ivorysql-version}/5.6.adoc[plpgsql_check] | 2.8 | 提供PL/pgSQL代码的静态分析功能,可在开发阶段发现潜在错误 | 存储过程开发、代码质量检查、调试优化 +| 7 | xref:v{ivorysql-version}/5.7.adoc[pgroonga] | 4.0.4 | 提供​非英语语言全文搜索功能,满足高性能应用的需求 | 中日韩等语言的全文搜索功能 +| 8 | xref:v{ivorysql-version}/5.8.adoc[pgaudit] | 18.0 | 提供细粒度的审计功能,记录数据库操作日志,便于安全审计和合规性检查 | 数据库安全审计、合规性检查、审计报告生成 +| 9 | xref:v{ivorysql-version}/5.9.adoc[pgrouting] | 3.8.0 | 提供地理空间数据的路由计算功能,支持多种算法和数据格式 | 地理空间分析、路径规划、物流优化 +| 10 | xref:v{ivorysql-version}/5.10.adoc[system_stats] | 3.2 | 提供用于访问系统级统计信息的函数 | 系统监控 +|==== + +这些插件均经过 IvorySQL 团队的测试和适配,确保在 IvorySQL 环境下稳定运行。用户可以根据业务需求选择合适的插件,进一步提升数据库系统的能力和灵活性。 + +我们也将持续扩展和丰富 IvorySQL 的插件生态,欢迎社区开发者提交新的插件适配建议或代码贡献。如需了解更多每个插件的详细使用方法和最新兼容版本,请参阅各插件对应的文档章节。 diff --git a/CN/modules/ROOT/pages/master/5.1.adoc b/CN/modules/ROOT/pages/v5.1/5.1.adoc similarity index 96% rename from CN/modules/ROOT/pages/master/5.1.adoc rename to CN/modules/ROOT/pages/v5.1/5.1.adoc index 0329399c..84f8ab03 100644 --- a/CN/modules/ROOT/pages/master/5.1.adoc +++ b/CN/modules/ROOT/pages/v5.1/5.1.adoc @@ -14,7 +14,7 @@ IvorySQL原生100%兼容PostgreSQL,因此,PostGIS可以完美适配IvorySQL。 除PostGIS社区提供的安装方式以外,IvorySQL社区也提供了源码安装方式,源码安装环境为 Ubuntu 24.04(x86_64)。 [NOTE] -请确保环境中已安装了**IvorySQL5.0及以上版本** +请确保环境中已安装了**IvorySQL{ivorysql-version}及以上版本** ** 安装依赖 [literal] diff --git a/CN/modules/ROOT/pages/master/5.10.adoc b/CN/modules/ROOT/pages/v5.1/5.10.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.10.adoc rename to CN/modules/ROOT/pages/v5.1/5.10.adoc diff --git a/CN/modules/ROOT/pages/master/5.2.adoc b/CN/modules/ROOT/pages/v5.1/5.2.adoc similarity index 98% rename from CN/modules/ROOT/pages/master/5.2.adoc rename to CN/modules/ROOT/pages/v5.1/5.2.adoc index c8bb7c89..b0c1a25a 100644 --- a/CN/modules/ROOT/pages/master/5.2.adoc +++ b/CN/modules/ROOT/pages/v5.1/5.2.adoc @@ -54,10 +54,10 @@ sudo --preserve-env=PG_CONFIG make install ** 创建pgvector扩展 + -[literal] +[literal,subs="attributes"] ---- [ivorysql@localhost ivorysql-5]$ psql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# create extension vector; diff --git a/CN/modules/ROOT/pages/master/5.3.adoc b/CN/modules/ROOT/pages/v5.1/5.3.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.3.adoc rename to CN/modules/ROOT/pages/v5.1/5.3.adoc diff --git a/CN/modules/ROOT/pages/master/5.4.adoc b/CN/modules/ROOT/pages/v5.1/5.4.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.4.adoc rename to CN/modules/ROOT/pages/v5.1/5.4.adoc diff --git a/CN/modules/ROOT/pages/master/5.5.adoc b/CN/modules/ROOT/pages/v5.1/5.5.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.5.adoc rename to CN/modules/ROOT/pages/v5.1/5.5.adoc diff --git a/CN/modules/ROOT/pages/master/5.6.adoc b/CN/modules/ROOT/pages/v5.1/5.6.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.6.adoc rename to CN/modules/ROOT/pages/v5.1/5.6.adoc diff --git a/CN/modules/ROOT/pages/master/5.7.adoc b/CN/modules/ROOT/pages/v5.1/5.7.adoc similarity index 94% rename from CN/modules/ROOT/pages/master/5.7.adoc rename to CN/modules/ROOT/pages/v5.1/5.7.adoc index 14727fe8..ffa8d05f 100644 --- a/CN/modules/ROOT/pages/master/5.7.adoc +++ b/CN/modules/ROOT/pages/v5.1/5.7.adoc @@ -20,10 +20,11 @@ IvorySQL社区提供了源码安装步骤,下面以PGroonga v4.0.4为例进行 === 安装依赖 环境 +[literal,subs="attributes"] ``` 操作系统:Ubuntu 24.04 CPU架构:x86_64 - IvorySQL: v5.0 + IvorySQL: v{ivorysql-version} ``` ==== 安装 msgpack-c @@ -74,6 +75,7 @@ highgo@ubuntu:~/work/IvorySQL/inst$ groonga --version psql 连接到数据库的pg模式下,执行命令: +[source,subs="attributes"] ```sql postgres=# CREATE extension pgroonga; CREATE EXTENSION @@ -86,7 +88,7 @@ postgres=# SELECT * FROM pg_available_extensions WHERE name = 'pgroonga'; postgres=# select version(); version -------------------------------------------------------------------------------- - PostgreSQL (IvorySQL 5.0) 18.0 on x86_64-linux, compiled by gcc-13.3.0, 64-bit + PostgreSQL (IvorySQL {ivorysql-version}) {pg-version} on x86_64-linux, compiled by gcc-13.3.0, 64-bit (1 row) ``` diff --git a/CN/modules/ROOT/pages/master/5.8.adoc b/CN/modules/ROOT/pages/v5.1/5.8.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/5.8.adoc rename to CN/modules/ROOT/pages/v5.1/5.8.adoc diff --git a/CN/modules/ROOT/pages/master/5.9.adoc b/CN/modules/ROOT/pages/v5.1/5.9.adoc similarity index 95% rename from CN/modules/ROOT/pages/master/5.9.adoc rename to CN/modules/ROOT/pages/v5.1/5.9.adoc index 9ef7989d..a65878b5 100644 --- a/CN/modules/ROOT/pages/master/5.9.adoc +++ b/CN/modules/ROOT/pages/v5.1/5.9.adoc @@ -14,7 +14,7 @@ pgRouting 广泛应用于物流配送、交通导航、网络分析、城市规 == 安装 [TIP] -环境中已经安装了IvorySQL5.0及以上版本,安装路径为/usr/local/ivorysql/ivorysql-5 +环境中已经安装了IvorySQL{ivorysql-version}及以上版本,安装路径为/usr/local/ivorysql/ivorysql-5 === 源码安装 diff --git a/CN/modules/ROOT/pages/master/6.1.1.adoc b/CN/modules/ROOT/pages/v5.1/6.1.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.1.1.adoc rename to CN/modules/ROOT/pages/v5.1/6.1.1.adoc diff --git a/CN/modules/ROOT/pages/master/6.2.1.adoc b/CN/modules/ROOT/pages/v5.1/6.2.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.2.1.adoc rename to CN/modules/ROOT/pages/v5.1/6.2.1.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.1.adoc b/CN/modules/ROOT/pages/v5.1/6.3.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.1.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.1.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.10.adoc b/CN/modules/ROOT/pages/v5.1/6.3.10.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.10.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.10.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.11.adoc b/CN/modules/ROOT/pages/v5.1/6.3.11.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.11.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.11.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.12.adoc b/CN/modules/ROOT/pages/v5.1/6.3.12.adoc similarity index 99% rename from CN/modules/ROOT/pages/master/6.3.12.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.12.adoc index 96d405bc..a0d55c92 100644 --- a/CN/modules/ROOT/pages/master/6.3.12.adoc +++ b/CN/modules/ROOT/pages/v5.1/6.3.12.adoc @@ -129,7 +129,7 @@ typedef enum IvyStmtType { IVY_STMT_UNKNOW, IVY_STMT_DO, - IVY_STMT_DOFROMCALL, /* new statementt type */ + IVY_STMT_DOFROMCALL, /* new statement type */ IVY_STMT_DOHANDLED, IVY_STMT_OTHERS } IvyStmtType; diff --git a/CN/modules/ROOT/pages/master/6.3.2.adoc b/CN/modules/ROOT/pages/v5.1/6.3.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.2.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.2.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.3.adoc b/CN/modules/ROOT/pages/v5.1/6.3.3.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.3.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.3.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.4.adoc b/CN/modules/ROOT/pages/v5.1/6.3.4.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.4.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.4.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.5.adoc b/CN/modules/ROOT/pages/v5.1/6.3.5.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.5.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.5.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.6.adoc b/CN/modules/ROOT/pages/v5.1/6.3.6.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.6.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.6.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.7.adoc b/CN/modules/ROOT/pages/v5.1/6.3.7.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.7.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.7.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.8.adoc b/CN/modules/ROOT/pages/v5.1/6.3.8.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.8.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.8.adoc diff --git a/CN/modules/ROOT/pages/master/6.3.9.adoc b/CN/modules/ROOT/pages/v5.1/6.3.9.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.3.9.adoc rename to CN/modules/ROOT/pages/v5.1/6.3.9.adoc diff --git a/CN/modules/ROOT/pages/master/6.4.1.adoc b/CN/modules/ROOT/pages/v5.1/6.4.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.4.1.adoc rename to CN/modules/ROOT/pages/v5.1/6.4.1.adoc diff --git a/CN/modules/ROOT/pages/master/6.4.2.adoc b/CN/modules/ROOT/pages/v5.1/6.4.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.4.2.adoc rename to CN/modules/ROOT/pages/v5.1/6.4.2.adoc diff --git a/CN/modules/ROOT/pages/master/6.5.adoc b/CN/modules/ROOT/pages/v5.1/6.5.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/6.5.adoc rename to CN/modules/ROOT/pages/v5.1/6.5.adoc diff --git a/CN/modules/ROOT/pages/master/7.1.adoc b/CN/modules/ROOT/pages/v5.1/7.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.1.adoc rename to CN/modules/ROOT/pages/v5.1/7.1.adoc diff --git a/CN/modules/ROOT/pages/master/7.10.adoc b/CN/modules/ROOT/pages/v5.1/7.10.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.10.adoc rename to CN/modules/ROOT/pages/v5.1/7.10.adoc diff --git a/CN/modules/ROOT/pages/master/7.11.adoc b/CN/modules/ROOT/pages/v5.1/7.11.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.11.adoc rename to CN/modules/ROOT/pages/v5.1/7.11.adoc diff --git a/CN/modules/ROOT/pages/master/7.12.adoc b/CN/modules/ROOT/pages/v5.1/7.12.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.12.adoc rename to CN/modules/ROOT/pages/v5.1/7.12.adoc diff --git a/CN/modules/ROOT/pages/master/7.13.adoc b/CN/modules/ROOT/pages/v5.1/7.13.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.13.adoc rename to CN/modules/ROOT/pages/v5.1/7.13.adoc diff --git a/CN/modules/ROOT/pages/master/7.14.adoc b/CN/modules/ROOT/pages/v5.1/7.14.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.14.adoc rename to CN/modules/ROOT/pages/v5.1/7.14.adoc diff --git a/CN/modules/ROOT/pages/master/7.15.adoc b/CN/modules/ROOT/pages/v5.1/7.15.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.15.adoc rename to CN/modules/ROOT/pages/v5.1/7.15.adoc diff --git a/CN/modules/ROOT/pages/master/7.16.adoc b/CN/modules/ROOT/pages/v5.1/7.16.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.16.adoc rename to CN/modules/ROOT/pages/v5.1/7.16.adoc diff --git a/CN/modules/ROOT/pages/master/7.17.adoc b/CN/modules/ROOT/pages/v5.1/7.17.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.17.adoc rename to CN/modules/ROOT/pages/v5.1/7.17.adoc diff --git a/CN/modules/ROOT/pages/master/7.18.adoc b/CN/modules/ROOT/pages/v5.1/7.18.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.18.adoc rename to CN/modules/ROOT/pages/v5.1/7.18.adoc diff --git a/CN/modules/ROOT/pages/master/7.19.adoc b/CN/modules/ROOT/pages/v5.1/7.19.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.19.adoc rename to CN/modules/ROOT/pages/v5.1/7.19.adoc diff --git a/CN/modules/ROOT/pages/master/7.2.adoc b/CN/modules/ROOT/pages/v5.1/7.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.2.adoc rename to CN/modules/ROOT/pages/v5.1/7.2.adoc diff --git a/CN/modules/ROOT/pages/master/7.20.adoc b/CN/modules/ROOT/pages/v5.1/7.20.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.20.adoc rename to CN/modules/ROOT/pages/v5.1/7.20.adoc diff --git a/CN/modules/ROOT/pages/master/7.21.adoc b/CN/modules/ROOT/pages/v5.1/7.21.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.21.adoc rename to CN/modules/ROOT/pages/v5.1/7.21.adoc diff --git a/CN/modules/ROOT/pages/master/7.22.adoc b/CN/modules/ROOT/pages/v5.1/7.22.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.22.adoc rename to CN/modules/ROOT/pages/v5.1/7.22.adoc diff --git a/CN/modules/ROOT/pages/master/7.3.adoc b/CN/modules/ROOT/pages/v5.1/7.3.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.3.adoc rename to CN/modules/ROOT/pages/v5.1/7.3.adoc diff --git a/CN/modules/ROOT/pages/master/7.4.adoc b/CN/modules/ROOT/pages/v5.1/7.4.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.4.adoc rename to CN/modules/ROOT/pages/v5.1/7.4.adoc diff --git a/CN/modules/ROOT/pages/master/7.5.adoc b/CN/modules/ROOT/pages/v5.1/7.5.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.5.adoc rename to CN/modules/ROOT/pages/v5.1/7.5.adoc diff --git a/CN/modules/ROOT/pages/master/7.6.adoc b/CN/modules/ROOT/pages/v5.1/7.6.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.6.adoc rename to CN/modules/ROOT/pages/v5.1/7.6.adoc diff --git a/CN/modules/ROOT/pages/master/7.7.adoc b/CN/modules/ROOT/pages/v5.1/7.7.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.7.adoc rename to CN/modules/ROOT/pages/v5.1/7.7.adoc diff --git a/CN/modules/ROOT/pages/master/7.8.adoc b/CN/modules/ROOT/pages/v5.1/7.8.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.8.adoc rename to CN/modules/ROOT/pages/v5.1/7.8.adoc diff --git a/CN/modules/ROOT/pages/master/7.9.adoc b/CN/modules/ROOT/pages/v5.1/7.9.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/7.9.adoc rename to CN/modules/ROOT/pages/v5.1/7.9.adoc diff --git a/CN/modules/ROOT/pages/master/8.1.adoc b/CN/modules/ROOT/pages/v5.1/8.1.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/8.1.adoc rename to CN/modules/ROOT/pages/v5.1/8.1.adoc diff --git a/CN/modules/ROOT/pages/master/8.2.adoc b/CN/modules/ROOT/pages/v5.1/8.2.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/8.2.adoc rename to CN/modules/ROOT/pages/v5.1/8.2.adoc diff --git a/CN/modules/ROOT/pages/master/9.adoc b/CN/modules/ROOT/pages/v5.1/9.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/9.adoc rename to CN/modules/ROOT/pages/v5.1/9.adoc diff --git a/CN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc b/CN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc new file mode 100644 index 00000000..85f5a83d --- /dev/null +++ b/CN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc @@ -0,0 +1,15 @@ + +:sectnums: +:sectnumlevels: 5 + += **芯片架构适配** + +IvorySQL适配认证如下CPU架构: +[cols="8h,~,~,~"] +|==== +| 序号 | 架构名称 | 适配品牌 | 全平台介质包下载 +| 1 | x86_64 | Intel、AMD、兆芯、海光 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-x86_64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-x86_64-rpm}[rpm] +| 2 | aarch64 | 飞腾、鲲鹏 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-aarch64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-aarch64-rpm}[rpm] +| 3 | mips64el| 龙芯3000、龙芯4000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-mips64el-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-mips64el-rpm}[rpm] +| 4 | loongarch64 | 龙芯5000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-loongarch64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-loongarch64-rpm}[rpm] +|==== \ No newline at end of file diff --git a/CN/modules/ROOT/pages/master/os_arch_adp.adoc b/CN/modules/ROOT/pages/v5.1/os_arch_adp.adoc similarity index 100% rename from CN/modules/ROOT/pages/master/os_arch_adp.adoc rename to CN/modules/ROOT/pages/v5.1/os_arch_adp.adoc diff --git a/CN/modules/ROOT/pages/master/welcome.adoc b/CN/modules/ROOT/pages/v5.1/welcome.adoc similarity index 83% rename from CN/modules/ROOT/pages/master/welcome.adoc rename to CN/modules/ROOT/pages/v5.1/welcome.adoc index efc84431..a2111166 100644 --- a/CN/modules/ROOT/pages/master/welcome.adoc +++ b/CN/modules/ROOT/pages/v5.1/welcome.adoc @@ -15,4 +15,4 @@ IvorySQL 项目是瀚高软件提出的一个开源项目,旨在将 Oracle 兼 IvorySQL 开源并且可以免费使用,如果您有任何建议请联系 support@ivorysql.org == 文档下载 -https://docs.ivorysql.org/cn/ivorysql-doc/v5.0/ivorysql.pdf[IvorySQL v5.0 pdf 文档] \ No newline at end of file +https://docs.ivorysql.org/cn/ivorysql-doc/v{ivorysql-version}/ivorysql.pdf[IvorySQL v{ivorysql-version} pdf 文档] \ No newline at end of file diff --git a/EN/antora.yml b/EN/antora.yml index db0c4c6a..06620fc2 100644 --- a/EN/antora.yml +++ b/EN/antora.yml @@ -1,10 +1,21 @@ name: ivorysql-doc title: IvorySQL -version: master -start_page: master/welcome.adoc +version: v5.1 +start_page: v5.1/welcome.adoc asciidoc: attributes: source-language: asciidoc@ table-caption: false + ivorysql-version: 5.1 + pg-version: 18.1 + package-link: 'https://github.com/ivorysql/ivorysql' + package-link-x86_64-deb: 'IvorySQL-5.1-62069c2-20251211.amd64.deb' + package-link-x86_64-rpm: 'IvorySQL-5.1-62069c2-20251211.x86_64.rpm' + package-link-aarch64-deb: 'IvorySQL-5.1-62069c2-20251211.arm64.deb' + package-link-aarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.aarch64.rpm' + package-link-mips64el-deb: 'IvorySQL-5.1-62069c2-20251211.mips64el.deb' + package-link-mips64el-rpm: 'IvorySQL-5.1-62069c2-20251211.mips64el.rpm' + package-link-loongarch64-deb: 'IvorySQL-5.1-62069c2-20251211.loongarch64.deb' + package-link-loongarch64-rpm: 'IvorySQL-5.1-62069c2-20251211.loongarch64.rpm' nav: - modules/ROOT/nav.adoc diff --git a/EN/modules/ROOT/nav.adoc b/EN/modules/ROOT/nav.adoc index 743a06ac..8823ea3f 100644 --- a/EN/modules/ROOT/nav.adoc +++ b/EN/modules/ROOT/nav.adoc @@ -1,84 +1,84 @@ -* xref:master/welcome.adoc[Welcome] -* xref:master/1.adoc[Release] -* xref:master/2.adoc[About] +* xref:v{ivorysql-version}/welcome.adoc[Welcome] +* xref:v{ivorysql-version}/1.adoc[Release] +* xref:v{ivorysql-version}/2.adoc[About] * Getting Started with IvorySQL -** xref:master/3.1.adoc[Quick Start] -** xref:master/3.2.adoc[Monitoring] -** xref:master/3.3.adoc[Maintenance] +** xref:v{ivorysql-version}/3.1.adoc[Quick Start] +** xref:v{ivorysql-version}/3.2.adoc[Monitoring] +** xref:v{ivorysql-version}/3.3.adoc[Maintenance] * IvorySQL Advanced Feature -** xref:master/4.1.adoc[Installation] -** xref:master/4.2.adoc[Cluster] -** xref:master/4.5.adoc[Migration] -** xref:master/4.3.adoc[Developer] +** xref:v{ivorysql-version}/4.1.adoc[Installation] +** xref:v{ivorysql-version}/4.2.adoc[Cluster] +** xref:v{ivorysql-version}/4.5.adoc[Migration] +** xref:v{ivorysql-version}/4.3.adoc[Developer] ** Containerization -*** xref:master/4.6.1.adoc[K8S deployment] -*** xref:master/4.6.2.adoc[Operator deployment] -*** xref:master/4.6.4.adoc[Docker & Podman deployment] -*** xref:master/4.6.3.adoc[Docker Swarm & Docker Compose deployment] -** xref:master/4.4.adoc[Operation Management] +*** xref:v{ivorysql-version}/4.6.1.adoc[K8S deployment] +*** xref:v{ivorysql-version}/4.6.2.adoc[Operator deployment] +*** xref:v{ivorysql-version}/4.6.4.adoc[Docker & Podman deployment] +*** xref:v{ivorysql-version}/4.6.3.adoc[Docker Swarm & Docker Compose deployment] +** xref:v{ivorysql-version}/4.4.adoc[Operation Management] ** Cloud Service Platform -*** xref:master/4.7.1.adoc[IvorySQL Cloud Installation] -*** xref:master/4.7.2.adoc[IvorySQL Cloud Usage] +*** xref:v{ivorysql-version}/4.7.1.adoc[IvorySQL Cloud Installation] +*** xref:v{ivorysql-version}/4.7.2.adoc[IvorySQL Cloud Usage] * IvorySQL Ecosystem -** xref:master/cpu_arch_adp.adoc[CPU Architecture Adaption] -** xref:master/os_arch_adp.adoc[Operating System Adaption] +** xref:v{ivorysql-version}/cpu_arch_adp.adoc[CPU Architecture Adaption] +** xref:v{ivorysql-version}/os_arch_adp.adoc[Operating System Adaption] ** Eco Component Adaption -*** xref:master/5.0.adoc[Overview] -*** xref:master/5.1.adoc[postgis] -*** xref:master/5.2.adoc[pgvector] -*** xref:master/5.3.adoc[pgddl(DDL Extractor)] -*** xref:master/5.4.adoc[pg_cron] -*** xref:master/5.5.adoc[pgsql-http] -*** xref:master/5.6.adoc[plpgsql_check] -*** xref:master/5.7.adoc[pgroonga] -*** xref:master/5.8.adoc[pgaudit] -*** xref:master/5.9.adoc[pgrouting] -*** xref:master/5.10.adoc[system_stats] +*** xref:v{ivorysql-version}/5.0.adoc[Overview] +*** xref:v{ivorysql-version}/5.1.adoc[postgis] +*** xref:v{ivorysql-version}/5.2.adoc[pgvector] +*** xref:v{ivorysql-version}/5.3.adoc[pgddl(DDL Extractor)] +*** xref:v{ivorysql-version}/5.4.adoc[pg_cron] +*** xref:v{ivorysql-version}/5.5.adoc[pgsql-http] +*** xref:v{ivorysql-version}/5.6.adoc[plpgsql_check] +*** xref:v{ivorysql-version}/5.7.adoc[pgroonga] +*** xref:v{ivorysql-version}/5.8.adoc[pgaudit] +*** xref:v{ivorysql-version}/5.9.adoc[pgrouting] +*** xref:v{ivorysql-version}/5.10.adoc[system_stats] * IvorySQL Architecture Design ** Query Processing -*** xref:master/6.1.1.adoc[Dual Parser] +*** xref:v{ivorysql-version}/6.1.1.adoc[Dual Parser] ** Compatibility Framework -*** xref:master/7.1.adoc[Ivorysql frame design] -*** xref:master/7.2.adoc[GUC Framework] -*** xref:master/7.4.adoc[Dual-mode design] -*** xref:master/6.2.1.adoc[initdb Process] +*** xref:v{ivorysql-version}/7.1.adoc[Ivorysql frame design] +*** xref:v{ivorysql-version}/7.2.adoc[GUC Framework] +*** xref:v{ivorysql-version}/7.4.adoc[Dual-mode design] +*** xref:v{ivorysql-version}/6.2.1.adoc[initdb Process] ** Compatibility Features -*** xref:master/6.3.1.adoc[like] -*** xref:master/6.3.3.adoc[RowID] -*** xref:master/6.3.2.adoc[OUT Parameter] -*** xref:master/6.3.4.adoc[%Type & %Rowtype] -*** xref:master/6.3.5.adoc[NLS Parameters] -*** xref:master/6.3.6.adoc[Function and stored procedure] -*** xref:master/6.3.7.adoc[Nested Subfunctions] -*** xref:master/6.3.8.adoc[Force View] -*** xref:master/6.3.9.adoc[Case Conversion] -*** xref:master/6.3.10.adoc[sys_guid Function] -*** xref:master/6.3.11.adoc[Empty String to NULL] -*** xref:master/6.3.12.adoc[CALL INTO] +*** xref:v{ivorysql-version}/6.3.1.adoc[like] +*** xref:v{ivorysql-version}/6.3.3.adoc[RowID] +*** xref:v{ivorysql-version}/6.3.2.adoc[OUT Parameter] +*** xref:v{ivorysql-version}/6.3.4.adoc[%Type & %Rowtype] +*** xref:v{ivorysql-version}/6.3.5.adoc[NLS Parameters] +*** xref:v{ivorysql-version}/6.3.6.adoc[Function and stored procedure] +*** xref:v{ivorysql-version}/6.3.7.adoc[Nested Subfunctions] +*** xref:v{ivorysql-version}/6.3.8.adoc[Force View] +*** xref:v{ivorysql-version}/6.3.9.adoc[Case Conversion] +*** xref:v{ivorysql-version}/6.3.10.adoc[sys_guid Function] +*** xref:v{ivorysql-version}/6.3.11.adoc[Empty String to NULL] +*** xref:v{ivorysql-version}/6.3.12.adoc[CALL INTO] ** Built-in Functions -*** xref:master/6.4.1.adoc[sys_context] -*** xref:master/6.4.2.adoc[userenv] -** xref:master/6.5.adoc[GB18030 Character Set] +*** xref:v{ivorysql-version}/6.4.1.adoc[sys_context] +*** xref:v{ivorysql-version}/6.4.2.adoc[userenv] +** xref:v{ivorysql-version}/6.5.adoc[GB18030 Character Set] * List of Oracle compatible features -** xref:master/7.3.adoc[1、Case conversion] -** xref:master/7.5.adoc[2、LIKE operator] -** xref:master/7.6.adoc[3、anonymous block] -** xref:master/7.7.adoc[4、functions and stored procedures] -** xref:master/7.8.adoc[5、Built-in data types and built-in functions] -** xref:master/7.9.adoc[6、ports and IP] -** xref:master/7.10.adoc[7、XML Function] -** xref:master/7.11.adoc[8、sequence] -** xref:master/7.12.adoc[9、Package] -** xref:master/7.13.adoc[10、Invisible Columns] -** xref:master/7.14.adoc[11、RowID Column] -** xref:master/7.15.adoc[12、OUT Parameter] -** xref:master/7.16.adoc[13、%Type & %Rowtype] -** xref:master/7.17.adoc[14、NLS Parameters] -** xref:master/7.18.adoc[15、Force View] -** xref:master/7.19.adoc[16、Nested Subfunctions] -** xref:master/7.20.adoc[17、sys_guid Function] -** xref:master/7.21.adoc[18、Empty String to NULL] -** xref:master/7.22.adoc[19、CALL INTO] -* xref:master/8.adoc[Community contribution] -* xref:master/9.adoc[Tool Reference] -* xref:master/10.adoc[FAQ] +** xref:v{ivorysql-version}/7.3.adoc[1、Case conversion] +** xref:v{ivorysql-version}/7.5.adoc[2、LIKE operator] +** xref:v{ivorysql-version}/7.6.adoc[3、anonymous block] +** xref:v{ivorysql-version}/7.7.adoc[4、functions and stored procedures] +** xref:v{ivorysql-version}/7.8.adoc[5、Built-in data types and built-in functions] +** xref:v{ivorysql-version}/7.9.adoc[6、ports and IP] +** xref:v{ivorysql-version}/7.10.adoc[7、XML Function] +** xref:v{ivorysql-version}/7.11.adoc[8、sequence] +** xref:v{ivorysql-version}/7.12.adoc[9、Package] +** xref:v{ivorysql-version}/7.13.adoc[10、Invisible Columns] +** xref:v{ivorysql-version}/7.14.adoc[11、RowID Column] +** xref:v{ivorysql-version}/7.15.adoc[12、OUT Parameter] +** xref:v{ivorysql-version}/7.16.adoc[13、%Type & %Rowtype] +** xref:v{ivorysql-version}/7.17.adoc[14、NLS Parameters] +** xref:v{ivorysql-version}/7.18.adoc[15、Force View] +** xref:v{ivorysql-version}/7.19.adoc[16、Nested Subfunctions] +** xref:v{ivorysql-version}/7.20.adoc[17、sys_guid Function] +** xref:v{ivorysql-version}/7.21.adoc[18、Empty String to NULL] +** xref:v{ivorysql-version}/7.22.adoc[19、CALL INTO] +* xref:v{ivorysql-version}/8.adoc[Community contribution] +* xref:v{ivorysql-version}/9.adoc[Tool Reference] +* xref:v{ivorysql-version}/10.adoc[FAQ] diff --git a/EN/modules/ROOT/pages/master/1.adoc b/EN/modules/ROOT/pages/master/1.adoc deleted file mode 100644 index 695b03fd..00000000 --- a/EN/modules/ROOT/pages/master/1.adoc +++ /dev/null @@ -1,205 +0,0 @@ - -:sectnums: -:sectnumlevels: 5 - - -== Version Overview - -[*Release Date: Nov 25, 2025*] - -IvorySQL 5.0, based on PostgreSQL 18.0, introduces significant Oracle compatibility improvements, PL/iSQL enhancements, and new globalization capabilities while refreshing packaging, automation, and tooling. For a comprehensive list of updates, please visit our https://docs.ivorysql.org/[documentation site]. - -== Enhancements - -- PostgreSQL 18.0 - -1. An asynchronous I/O (AIO) subsystem that can improve performance of sequential scans, bitmap heap scans, vacuums, and other operations. -2. pg_upgrade now retains optimizer statistics. -3. Support for "skip scan" lookups that allow using multicolumn B-tree indexes in more cases. -4. uuidv7() function for generating timestamp-ordered UUIDs. -5. Virtual generated columns that compute their values during read operations. This is now the default for generated columns. -6. OAuth authentication support. -7. OLD and NEW support for RETURNING clauses in INSERT, UPDATE, DELETE, and MERGE commands. -8. Temporal constraints, or constraints over ranges, for PRIMARY KEY, UNIQUE, and FOREIGN KEY constraints. - -For further details, visit https://www.postgresql.org/docs/release/18.0/[PostgreSQL’s release notes]. - -== New Features -=== 21 New Oracle Compatibility Features - -- Oracle-compatible ROWID support: Feature https://github.com/IvorySQL/IvorySQL/issues/126[#126] + - Ensures IvorySQL row identifiers align with Oracle semantics for seamless cross-database tooling. - -- PL/iSQL CALL invocation syntax: Feature https://github.com/IvorySQL/IvorySQL/issues/764[#764] + - Adds the Oracle-style `CALL` entry point so stored procedures can be invoked consistently. - -- PL/iSQL `%ROWTYPE` support: Feature https://github.com/IvorySQL/IvorySQL/issues/765[#765] + - Allows variables to mirror entire table or cursor rows for concise PL/iSQL coding. - -- PL/iSQL `%TYPE` support: Feature https://github.com/IvorySQL/IvorySQL/issues/766[#766] + - Enables variables to adopt the data type of existing columns or variables to reduce drift. - -- Case-sensitive compatibility switch: Feature https://github.com/IvorySQL/IvorySQL/issues/767[#767] + - Preserves identifier case to match Oracle behavior when required. - -- NLS parameter compatibility: Feature https://github.com/IvorySQL/IvorySQL/issues/768[#768] + - Honors Oracle-style NLS settings such as `NLS_DATE_FORMAT` and `NLS_TIMESTAMP_FORMAT`. - -- Empty string to NULL translation: Feature https://github.com/IvorySQL/IvorySQL/issues/769[#769] + - Converts zero-length strings to NULL to match Oracle compatibility rules. - -- Parser switching capability: Feature https://github.com/IvorySQL/IvorySQL/issues/770[#770] + - Adds toggles between Oracle and PostgreSQL parsers for per-session flexibility. - -- GB18030 database encoding: Feature https://github.com/IvorySQL/IvorySQL/issues/771[#771] + - Provides GB18030 initialization and create-database options for full Chinese market coverage. - -- Oracle-compatible `SYS_GUID`: Feature https://github.com/IvorySQL/IvorySQL/issues/773[#773] + - Implements the Oracle `SYS_GUID` function to generate RAW-based GUIDs. - -- Oracle-compatible `SYS_CONTEXT`: Feature https://github.com/IvorySQL/IvorySQL/issues/774[#774] + - Delivers the Oracle `SYS_CONTEXT` API for querying session and environment metadata. - -- Oracle-compatible `USERENV`: Feature https://github.com/IvorySQL/IvorySQL/issues/775[#775] + - Adds the `USERENV` function so sessions can inspect Oracle-style contextual details. - -- Oracle-compatible function syntax: Feature https://github.com/IvorySQL/IvorySQL/issues/776[#776] + - Supports Oracle constructs such as EDITIONABLE/NONEDITIONABLE, `RETURN`, `IS`, and `OUT ... NOCOPY` options. - -- Oracle-compatible procedure syntax: Feature https://github.com/IvorySQL/IvorySQL/issues/777[#777] + - Enables procedure DDL with Oracle options, EXEC invocation, and ALTER PROCEDURE support. - -- libpq OUT parameter plumbing: Feature https://github.com/IvorySQL/IvorySQL/issues/778[#778] + - Extends client protocol handling so OUT parameters can be consumed like OCI. - -- Procedure OUT parameter support: Feature https://github.com/IvorySQL/IvorySQL/issues/779[#779] + - Allows stored procedures to declare IN, OUT, and IN OUT modes per Oracle conventions. - -- Function OUT parameter support: Feature https://github.com/IvorySQL/IvorySQL/issues/780[#780] + - Permits Oracle-style OUT parameters within functions, including IN OUT combinations. - -- Nested subprograms: Feature https://github.com/IvorySQL/IvorySQL/issues/781[#781] + - Introduces support for declaring functions or procedures within other subprograms, including overloading. - -- Oracle-compatible `INSTR`: Feature https://github.com/IvorySQL/IvorySQL/issues/782[#782] + - Matches Oracle `INSTR` behavior for substring searches and position checks. - -- Oracle-compatible FORCE VIEW: Feature https://github.com/IvorySQL/IvorySQL/issues/783[#783] + - Lets views be created even when referenced objects do not yet exist, mirroring Oracle's FORCE option. - -- Oracle-compatible LIKE operator: Feature https://github.com/IvorySQL/IvorySQL/issues/784[#784] + - Aligns pattern-matching semantics with Oracle for predictable wildcard behavior. - -=== Online Trial and Multi-Platform Distribution Packages - -- Online Experience: IvorySQL v5.0: Featuare https://github.com/IvorySQL/IvorySQL/issues/887[#887] + - An interactive, browser-based environment will be launched to allow users to explore and evaluate IvorySQL v5.0 in real time — no installation required. - -- Packaging for All Platforms: Featuare https://github.com/IvorySQL/IvorySQL/issues/949[#949] + - Provides multi-platform media packages for X86、ARM、MIPS、LoongArch architecture. - -=== Cloud-Native & Containerized - -- Containerized Deployment Support (Docker Compose & Docker Swarm): - Supports deployment of standalone IvorySQL databases and high-availability clusters in Docker Swarm and Docker Compose environments. - -- Containerized Deployment Support (Kubernetes): - Supports deployment of standalone IvorySQL databases and high-availability clusters on Kubernetes (K8S) using Helm. - -- IvorySQL Operator v5 released (Kubernetes): - The IvorySQL Operator v5 has been adapted to support IvorySQL v5.0, with upgrades to system component versions and database extension versions. - -- IvorySQL Cloud v5 released (Unified Lifecycle & Visual Control Plane): - Offers a fully managed, graphical control plane that handles IvorySQL v5 database subscriptions, orchestrates end-to-end lifecycle operations, and integrates surrounding ecosystem services. - -=== Support for 10 Additional PostgreSQL Extensions - -- pg_cron: Feature https://github.com/IvorySQL/IvorySQL/issues/882[#882] + - Scheduled job execution within the database layer will be available through pg_cron integration. - -- pgAudit: Feature https://github.com/IvorySQL/IvorySQL/issues/929[#929] + - Provides detailed session and/or object audit logging via the standard PostgreSQL logging facility. - -- PostGIS: Feature https://github.com/IvorySQL/IvorySQL/issues/880[#880] + - Spatial data processing and geospatial analytics will be enabled through PostGIS compatibility. - -- pgRouting: Feature https://github.com/IvorySQL/IvorySQL/issues/881[#881] + - Network and routing analysis features will be introduced with pgRouting support. - -- PGroonga: Feature https://github.com/IvorySQL/IvorySQL/issues/879[#879] + - Full-text search capabilities will be enhanced via planned PGroonga support. - -- ddlx: Feature https://github.com/IvorySQL/IvorySQL/issues/877[#877] + - Support for ddlx to enable advanced schema introspection and automated DDL generation. - -- pgsql-http: Feature https://github.com/IvorySQL/IvorySQL/issues/883[#883] + - Allow the database to initiate HTTP/HTTPS requests internally, enabling seamless communication between the database and external web services. - -- system_stats: Feature https://github.com/IvorySQL/IvorySQL/issues/946[#946] + - System level statistics will be provided by system_stats support. - -- plpgsql_check: Feature https://github.com/IvorySQL/IvorySQL/issues/915[#915] + - Static code analysis on PL/pgSQL functions to identify errors, warnings, and potential issues before runtime execution - -- pgvector: Feature https://github.com/IvorySQL/IvorySQL/issues/878[#878] + - Integration with pgvector to empower AI/ML workloads through native vector similarity search. - -== Fixed Issues - -- Repaired `unused_oids` and `duplicate_oids` catalog tooling so header scans correctly detect conflicts without false positives: Issue https://github.com/IvorySQL/IvorySQL/issues/841[#841] -- Added `.gitignore` coverage for `libpq/ivytest` artifacts to prevent generated binaries and logs from polluting developer trees: Issue https://github.com/IvorySQL/IvorySQL/issues/843[#843] -- Extended GitHub workflow regression runs to cover builds configured with `--with-libnuma`, preventing future breakages on NUMA-enabled hosts: Issue https://github.com/IvorySQL/IvorySQL/issues/869[#869] -- Enabled `psql` users to access CREATE PACKAGE syntax help via `\h create package`, closing the CLI documentation gap for PL/iSQL packages: Issue https://github.com/IvorySQL/IvorySQL/issues/936[#936] -- Eliminated the MainLoop dangling-pointer scenario that triggered intermittent segmentation faults under concurrency stress: Issue https://github.com/IvorySQL/IvorySQL/issues/898[#898] -- Re-enabled `oracle_test/modules/*/sql` cases by fixing harness assumptions so Oracle-compatibility suites execute end-to-end again: Issue https://github.com/IvorySQL/IvorySQL/issues/897[#897] -- Updated `README.md` and `README_CN.md` to reflect IvorySQL v5 feature set, packaging, and onboarding instructions: Issue https://github.com/IvorySQL/IvorySQL/issues/896[#896] -- Corrected globally unique index enforcement so related regression tests now pass reliably across supported platforms: Issue https://github.com/IvorySQL/IvorySQL/issues/894[#894] - -== Source Code - -IvorySQL's development is maintained across four main repositories: - -- IvorySQL database source code: https://github.com/IvorySQL/IvorySQL -- IvorySQL official website: https://github.com/IvorySQL/Ivory-www -- IvorySQL documentation: https://github.com/IvorySQL/IvorySQL-docs -- IvorySQL Docker: https://github.com/IvorySQL/docker_library - -== Contributors - -The following individuals (in alphabetical order) have contributed to this release as patch authors, committers, reviewers, testers, or reporters of issues. - -* Carlos Chong -* ccwxl -* Cédric Villemain -* elodiefb -* Fawei Zhao -* Ge Sui -* Grant Zhou -* Imran Zaheer -* jerome-peng -* Jiaoshun Tian -* luss -* Martin Gerhardy -* msdnchina -* omstack -* otegami -* rophy -* Shaolin Chu -* Shawn Yan -* Shihua Yang -* Shiji Niu -* Shuisen Tong -* shlei6067 -* sjw1933 -* Xiangyu Liang -* Xiaohui Liu -* Xinjie Lv -* xuexiaoganghs -* Xueyu Gao -* yangchunwanwusheng -* Yanliang Lei -* Yasir Hussain Shah -* Yuan Li -* Zheng Tao -* Zhenhao Pan -* Zhuoyan Shi \ No newline at end of file diff --git a/EN/modules/ROOT/pages/master/5.0.adoc b/EN/modules/ROOT/pages/master/5.0.adoc deleted file mode 100644 index 1d51e2fa..00000000 --- a/EN/modules/ROOT/pages/master/5.0.adoc +++ /dev/null @@ -1,29 +0,0 @@ -:sectnums: -:sectnumlevels: 5 - - -[discrete] -== IvorySQL Ecosystem Plugin Compatibility List - -IvorySQL, as an advanced open-source database compatible with Oracle and based on PostgreSQL, has powerful extension capabilities and supports a rich ecosystem of plugins. These plugins can help users enhance database functionality in different scenarios, including geospatial information processing, vector retrieval, full-text search, data definition extraction, and path planning. The following is a list of major plugins currently officially compatible with and supported by IvorySQL: - -+ - -[cols="1,2,1,3,3"] -|==== -|*Index*|*Plugin Name*|*Version*|*Function Description*|*Use Cases* -|*1*| xref:master/5.1.adoc[postgis] | 3.5.4 | Provides geospatial data support for IvorySQL, including spatial indexes, spatial functions, and geographic object storage | Geographic Information Systems (GIS), map services, location data analysis -|*2*| xref:master/5.2.adoc[pgvector] | 0.8.1 | Supports vector similarity search, can be used to store and retrieve high-dimensional vector data| AI applications, image retrieval, recommendation systems, semantic search -|*3*| xref:master/5.3.adoc[pgddl (DDL Extractor)] | 0.31 | Extracts DDL (Data Definition Language) statements from databases, facilitating version management and migration | Database version control, CI/CD integration, structure comparison and synchronization -|*4*| xref:master/5.4.adoc[pg_cron]​ | 1.6.0 | Provides database-internal scheduled task scheduling functionality, supports regular SQL statement execution | Data cleanup, regular statistics, automated maintenance tasks -|*5*| xref:master/5.5.adoc[pgsql-http]​ | 1.7.0 | Allows HTTP requests to be initiated in SQL, interacting with external web services | Data collection, API integration, microservice calls -|*6*| xref:master/5.6.adoc[plpgsql_check] | 2.8 | Provides static analysis functionality for PL/pgSQL code, can detect potential errors during development | Stored procedure development, code quality checking, debugging and optimization -|*7*| xref:master/5.7.adoc[pgroonga] | 4.0.4 | Provides full-text search functionality for non-English languages, meeting the needs of high-performance applications | Full-text search capabilities for languages like Chinese, Japanese, and Korean -|*8*| xref:master/5.8.adoc[pgaudit] | 18.0 | Provides fine-grained auditing, recording database operation logs to support security auditing and compliance checks | Database security auditing, compliance checks, audit report generation -|*9*| xref:master/5.9.adoc[pgrouting] | 3.8.0 | Provides routing computation for geospatial data, supporting multiple algorithms and data formats | Geospatial analysis, route planning, logistics optimization -|*10*| xref:master/5.10.adoc[system_stats] | 3.2 | Provide functions for accessing system-level statistics. | system monitor -|==== - -These plugins have all been tested and adapted by the IvorySQL team to ensure stable operation in the IvorySQL environment. Users can select appropriate plugins based on business needs to further enhance the capabilities and flexibility of the database system. - -We will continue to expand and enrich the IvorySQL plugin ecosystem. Community developers are welcome to submit new plugin adaptation suggestions or code contributions. For more detailed usage methods and the latest compatible versions of each plugin, please refer to the corresponding documentation chapters for each plugin. diff --git a/EN/modules/ROOT/pages/master/cpu_arch_adp.adoc b/EN/modules/ROOT/pages/master/cpu_arch_adp.adoc deleted file mode 100644 index 856c8a35..00000000 --- a/EN/modules/ROOT/pages/master/cpu_arch_adp.adoc +++ /dev/null @@ -1,15 +0,0 @@ - -:sectnums: -:sectnumlevels: 5 - -= **CPU Architecture Adaption** - -IvorySQL adapts the following CPU architectures: -[cols="8h,~,~,~"] -|==== -| Index | Architecture Name | Adapt to brands | Multi-platform Media Packages -| 1 | x86_64 | Intel, AMD, ZHAOXIN, HYGON | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.amd64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.x86_64.rpm[rpm] -| 2 | aarch64 | Phytium, Kunpeng | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.arm64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.aarch64.rpm[rpm] -| 3 | mips64el| Loongson3000,Loongson4000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.mips64el.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.mips64el.rpm[rpm] -| 4 | loongarch64 | Loongson5000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251118.loongarch64.deb[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251118.loongarch64.rpm[rpm] -|==== diff --git a/EN/modules/ROOT/pages/v5.1/1.adoc b/EN/modules/ROOT/pages/v5.1/1.adoc new file mode 100644 index 00000000..722ffbd2 --- /dev/null +++ b/EN/modules/ROOT/pages/v5.1/1.adoc @@ -0,0 +1,84 @@ + +:sectnums: +:sectnumlevels: 5 + + +== Version Overview + +[*Release Date: Dec 18, 2025*] + +IvorySQL 5.1 is built on PostgreSQL 18.1 and includes a variety of bug fixes. For a comprehensive list of updates, please visit our https://docs.ivorysql.org/[documentation site]. + +== Enhancements + +- PostgreSQL 18.1 + +1. Check for CREATE privileges on the schema in CREATE STATISTICS. +2. Avoid integer overflow in allocation-size calculations within libpq. +3. Prevent “unrecognized node type” errors when a SQL/JSON function such as JSON_VALUE has a DEFAULT clause containing a COLLATE expression. +4. Avoid incorrect optimization of variable-free HAVING clauses with grouping sets. +5. Do not use parallelism in hash right semi joins. +6. Avoid possible division-by-zero when creating ordered-append plans. +7. Fix planner failure with index types that can do ordered access but not index-only scans. + +For further details, visit https://www.postgresql.org/docs/release/18.1/[PostgreSQL’s release notes]. + +== New Features + +- Upgrade to PG 18.1 kernel: Feature https://github.com/IvorySQL/IvorySQL/pull/1004[#1004] + + PostgreSQL kernel upgraded to version 18.1. + +- http://trial.ivorysql.org/[Online Experience]: IvorySQL 5.1: Feature https://github.com/IvorySQL/ivorysql-wasm/pull/6[#6] + + An interactive, browser-based environment will be launched to allow users to explore and evaluate IvorySQL 5.1 in real time — no installation required. + +- Packaging for All Platforms: Feature https://github.com/IvorySQL/IvorySQL/issues/1136[#1136] + + Provides multi-platform media packages for X86, ARM, MIPS, LoongArch architecture. + +- Containerized Deployment Support + + Supports one-click deployment of standalone or highly available IvorySQL 5.1 clusters via Docker Compose, Podman, Swarm, Helm, and the IvorySQL 5.1 Operator. + +- IvorySQL Cloud 5.1 released (Visual Database Lifecycle Management Platform) + + Offers a fully managed, graphical control plane that handles IvorySQL 5.1 database subscriptions, orchestrates end-to-end lifecycle operations, and integrates surrounding ecosystem services. + +- PostgreSQL Extensions + + Support for 10 Additional PostgreSQL Extensions: pg_cron, pgAudit, PostGIS, pgRouting, PGroonga, ddlx, pgsql-http, system_stats, plpgsql_check, pgvector. + +== Fixed Issues + +- Clear build warnings: Issue https://github.com/IvorySQL/IvorySQL/issues/996[#996] +- PL/iSQL Parser Rejects Parentheses in SELECT INTO Expression: Issue https://github.com/IvorySQL/IvorySQL/issues/981[#981] +- Doc:Fix reports missing uuid-ossp during source installation: Issue https://github.com/IvorySQL/ivorysql_docs/pull/198[#198] + +== Source Code + +IvorySQL's development is maintained across four main repositories: + +- IvorySQL database source code: https://github.com/IvorySQL/IvorySQL +- IvorySQL official website: https://github.com/IvorySQL/Ivory-www +- IvorySQL documentation: https://github.com/IvorySQL/IvorySQL_docs +- IvorySQL Docker: https://github.com/IvorySQL/docker_library + +== Contributors + +The following individuals (in alphabetical order) have contributed to this release as patch authors, committers, reviewers, testers, or reporters of issues. + +* Amberwww1 +* Cédric Villemain +* Fawei Zhao +* Ge Sui +* Grant Zhou +* Oreo Yang +* Rophy Tsai +* Shuntian Jiao +* Steven Niu +* Xiangyu Liang +* Xiaohui Liu +* Xinjie Lv +* Xueyu Gao +* Yasir Hussain Shah +* Yuan Li +* Zheng Tao +* Zhenhao Pan +* Zhe Zhang +* Zhibin Wang +* Zhuoyan Shi \ No newline at end of file diff --git a/EN/modules/ROOT/pages/master/10.adoc b/EN/modules/ROOT/pages/v5.1/10.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/10.adoc rename to EN/modules/ROOT/pages/v5.1/10.adoc diff --git a/EN/modules/ROOT/pages/master/2.adoc b/EN/modules/ROOT/pages/v5.1/2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/2.adoc rename to EN/modules/ROOT/pages/v5.1/2.adoc diff --git a/EN/modules/ROOT/pages/master/3.1.adoc b/EN/modules/ROOT/pages/v5.1/3.1.adoc similarity index 88% rename from EN/modules/ROOT/pages/master/3.1.adoc rename to EN/modules/ROOT/pages/v5.1/3.1.adoc index 8a1c16e2..ba31f38d 100644 --- a/EN/modules/ROOT/pages/master/3.1.adoc +++ b/EN/modules/ROOT/pages/v5.1/3.1.adoc @@ -50,8 +50,9 @@ enabled=1 gpgcheck=0 ``` After saving and exiting, you can install IvorySQL 4 with the following steps +[source,bash,subs="attributes"] ``` -$ sudo dnf install -y ivorysql5-5.0 +$ sudo dnf install -y ivorysql5-{ivorysql-version} ``` [[setting-environment-variables]] @@ -107,28 +108,35 @@ ivorysql 3238 1551 0 20:35 pts/0 00:00:00 grep --color=auto postgres === Running IvorySQL in docker ** Get IvorySQL image from Docker Hub + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Running IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Check if the IvorySQL container is running successfully + +[source,bash,subs="attributes"] ``` $ docker ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -6faa2d0ed705 ivorysql:5.0-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql +6faa2d0ed705 IvorySQL {ivorysql-version}-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql ``` == Connecting to IvorySQL Connect to IovrySQL via psql: +[source,subs="attributes"] ``` $ psql -d -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# @@ -143,4 +151,4 @@ TIP: When running IvorySQL in Docker, additional parameters need to be added, li Now you can start your journey of IvorySQL! Enjoy! -To explore additional installation methods, please refer to the xref:v5.0/6.adoc[Installation]. \ No newline at end of file +To explore additional installation methods, please refer to the xref:v{ivorysql-version}/4.1.adoc[Installation]. \ No newline at end of file diff --git a/EN/modules/ROOT/pages/master/3.2.adoc b/EN/modules/ROOT/pages/v5.1/3.2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/3.2.adoc rename to EN/modules/ROOT/pages/v5.1/3.2.adoc diff --git a/EN/modules/ROOT/pages/master/3.3.adoc b/EN/modules/ROOT/pages/v5.1/3.3.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/3.3.adoc rename to EN/modules/ROOT/pages/v5.1/3.3.adoc diff --git a/EN/modules/ROOT/pages/master/4.1.adoc b/EN/modules/ROOT/pages/v5.1/4.1.adoc similarity index 84% rename from EN/modules/ROOT/pages/master/4.1.adoc rename to EN/modules/ROOT/pages/v5.1/4.1.adoc index aad96b6a..18d6283c 100644 --- a/EN/modules/ROOT/pages/master/4.1.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.1.adoc @@ -15,7 +15,7 @@ The installation methods for IvorySQL include the following five: - <> -This chapter will provide detailed instructions on the installation, execution, and uninstallation processes for each method. For a quicker access to IvorySQL, please refer to xref:v5.0/3.adoc#quick-installation[Quick installation]. +This chapter will provide detailed instructions on the installation, execution, and uninstallation processes for each method. For a quicker access to IvorySQL, please refer to xref:v{ivorysql-version}/3.1.adoc#quick-installation[Quick installation]. Before getting started, please create an user and grant it root privileges. All the installation steps will be performed by this user. Here we just name it 'ivorysql'. @@ -32,21 +32,26 @@ enabled=1 gpgcheck=0 ``` After saving and exiting, you can install IvorySQL 4 with the following steps +[source,bash,subs="attributes"] ``` -$ sudo dnf install -y ivorysql5-5.0 +$ sudo dnf install -y ivorysql5-{ivorysql-version} ``` [[Docker-installation]] == Docker installation ** Get IvorySQL image from Docker Hub + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Run IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` -e Parameter Explanation |==== @@ -73,8 +78,10 @@ $ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d $ sudo dnf install -y lz4 libicu libxslt python3 ``` ** Getting rpms + +[source,bash,subs="attributes"] ``` -$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-9d890e9-20251120.x86_64.rpm +$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-9d890e9-20251120.x86_64.rpm ``` ** Installing rpms @@ -90,8 +97,14 @@ IvorySQL then will be installed in the /usr/ivory-5/ directory. == Source code installation ** Installing dependencies ``` -$ sudo dnf install -y bison readline-devel zlib-devel openssl-devel +# CentOS +$ sudo dnf install -y bison readline-devel zlib-devel openssl-devel uuid-devel $ sudo dnf groupinstall -y 'Development Tools' + +# Ubuntu +$ sudo apt install -y bison libreadline-dev zlib1g-dev libssl-dev +$ sudo apt install -y build-essential +$ sudo apt install -y pkg-config uuid-dev ``` ** Getting source code ``` @@ -138,13 +151,17 @@ $ sudo apt -y install pkg-config libreadline-dev libicu-dev libldap2-dev uuid-de ``` ** Getting deb + +[source,bash,subs="attributes"] ``` -$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_5.0/IvorySQL-5.0-a50789d-20250304.amd64.deb +$ sudo wget https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb ``` ** Installing deb + +[source,bash,subs="attributes"] ``` -$ sudo dpkg -i IvorySQL-5.0-a50789d-20250304.amd64.deb +$ sudo dpkg -i IvorySQL-{ivorysql-version}-a50789d-20250304.amd64.deb ``` IvorySQL will then be installed in the /usr/ivory-5/ directory. @@ -211,9 +228,10 @@ ivorysql 130445 130274 0 02:45 pts/1 00:00:00 grep --color=auto postgres == Connecting to IvorySQL Connect to IovrySQL via psql: +[source,subs="attributes"] ``` $ psql -d -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# @@ -236,40 +254,45 @@ No matter which method is used for the uninstallation, make sure the service has === Uninstallation for yum installation Run the following commands in turn and clean the residual folders: +[source,bash,subs="attributes"] ``` -$ sudo dnf remove -y ivorysql5-5.0 +$ sudo dnf remove -y ivorysql5-{ivorysql-version} ``` === Uninstallation for docker installation Stop IvorySQL container and remove IvorySQL image: +[source,bash,subs="attributes"] ``` $ docker stop ivorysql $ docker rm ivorysql -$ docker rmi ivorysql/ivorysql:5.0-ubi8 +$ docker rmi ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` === Uninstallation for rpm installation Uninstall the rpms and clear the residual folders: +[source,bash,subs="attributes"] ``` $ sudo yum remove --disablerepo=* ivorysql5\* -$ sudo rm -rf IvorySQL-5.0 +$ sudo rm -rf IvorySQL-{ivorysql-version} ``` === Uninstallation for source code installation Uninstall the database system, then clear the residual folders: +[source,bash,subs="attributes"] ``` $ sudo make uninstall $ make clean -$ sudo rm -rf IvorySQL-5.0 +$ sudo rm -rf IvorySQL-{ivorysql-version} ``` === Uninstallation for deb installation Uninstall the database system, then clear the residual folders: +[source,bash,subs="attributes"] ``` -$ sudo dpkg -P IvorySQL-5.0 -$ sudo rm -rf IvorySQL-5.0 +$ sudo dpkg -P IvorySQL-{ivorysql-version} +$ sudo rm -rf IvorySQL-{ivorysql-version} ``` \ No newline at end of file diff --git a/EN/modules/ROOT/pages/master/4.2.adoc b/EN/modules/ROOT/pages/v5.1/4.2.adoc similarity index 91% rename from EN/modules/ROOT/pages/master/4.2.adoc rename to EN/modules/ROOT/pages/v5.1/4.2.adoc index f0782ab9..3ee5e49b 100644 --- a/EN/modules/ROOT/pages/master/4.2.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.2.adoc @@ -8,9 +8,9 @@ This chapter is a demo to show you how to build an IvorySQL cluster. Just take a == Primary node === Installing and start database -For quick database installation by yum, please refer to xref:v5.0/3.adoc#quick-installation[Quick installation]。 +For quick database installation by yum, please refer to xref:v{ivorysql-version}/3.1.adoc#quick-installation[Quick installation]。 -For more installation options, please refer to xref:v5.0/6.adoc#Installation[Installation]。 +For more installation options, please refer to xref:v{ivorysql-version}/4.1.adoc#Installation[Installation]。 [NOTE] The master node database needs to be installed and **started**. @@ -55,9 +55,9 @@ $ pg_ctl restart == Standby node === Installing database -For quick database installation by yum, please refer to xref:v5.0/3.adoc#quick-installation[Quick installation]。 +For quick database installation by yum, please refer to xref:v{ivorysql-version}/3.1.adoc#quick-installation[Quick installation]。 -For more installation options, please refer to xref:v5.0/6.adoc#Installation[Installation]。 +For more installation options, please refer to xref:v{ivorysql-version}/4.1.adoc#Installation[Installation]。 [NOTE] The standby node database only needs to be installed and **not started**. @@ -115,9 +115,10 @@ ivorysql 6567 6139 0 21:54 ? 00:00:00 postgres: walreceiver streaming ... ``` On the primary node, connect to IvorySQL and show the status: +[source,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# select * from pg_stat_replication; @@ -139,9 +140,10 @@ Here 192.168.31.102 is the ip address of the standby node, and async means the d All writing operations are performed on the primary node, while reading can be on both primary and standby. The data on primary is synchronized to standby through streaming replication. The writing result can be queried on all the nodes in the cluster. Below is an example. Create a new database test on primary and query: +[source,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# create database test; @@ -159,9 +161,10 @@ ivorysql=# \l (4 rows) ``` Query on the standby node: +[source,subs="attributes"] ``` $ psql -d ivorysql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# \l diff --git a/EN/modules/ROOT/pages/master/4.3.adoc b/EN/modules/ROOT/pages/v5.1/4.3.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/4.3.adoc rename to EN/modules/ROOT/pages/v5.1/4.3.adoc diff --git a/EN/modules/ROOT/pages/master/4.4.adoc b/EN/modules/ROOT/pages/v5.1/4.4.adoc similarity index 99% rename from EN/modules/ROOT/pages/master/4.4.adoc rename to EN/modules/ROOT/pages/v5.1/4.4.adoc index f3a63925..b080eb36 100644 --- a/EN/modules/ROOT/pages/master/4.4.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.4.adoc @@ -77,7 +77,7 @@ When the above operation is executed, the old and new versions of the backend se === Upgrade with the pg_upgrade utility -The pg_upgrade tool is a built-in cross-version upgrade utility in PostgreSQL that enables in-place database upgrades without requiring export and import operations. Since IvorySQL is derived from PostgreSQL, it can also use the pg_upgrade tool for major version upgrades. Below is a brief introduction on how to use pg_upgrade to upgrade IvorySQL to the latest 5.0 version on the CentOS8 platform. +The pg_upgrade tool is a built-in cross-version upgrade utility in PostgreSQL that enables in-place database upgrades without requiring export and import operations. Since IvorySQL is derived from PostgreSQL, it can also use the pg_upgrade tool for major version upgrades. Below is a brief introduction on how to use pg_upgrade to upgrade IvorySQL to the latest {ivorysql-version} version on the CentOS8 platform. pg_upgrade provides a pre-upgrade compatibility check (using the -c or --check option), which can identify issues such as plugin or data type incompatibilities. If the --link option is specified, the new version service can directly use the existing database files without copying, typically completing the upgrade in just a few minutes. @@ -96,23 +96,26 @@ First, stop the old version of the IvorySQL 4.6 database: ``` /usr/ivory-4/bin/pg_ctl -D ./data stop ``` -Then install the new version of the IvorySQL 5.0 database: +Then install the new version of the IvorySQL {ivorysql-version} database: +[source,bash,subs="attributes"] ``` -dnf install -y ivorysql5-5.0 +dnf install -y ivorysql5-{ivorysql-version} ``` -Initialize the new IvorySQL 5.0 data directory: +Initialize the new IvorySQL {ivorysql-version} data directory: ``` /usr/ivory-5/bin/initdb -D ./data ``` Check version compatibility: +[source,bash,subs="attributes"] ``` -/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/5.0/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ --check +/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/{ivorysql-version}/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ --check ``` The appearance of "Clusters are compatible" at the end indicates that there are no compatibility issues between the two versions of data, and the upgrade can proceed. Official upgrade: +[source,bash,subs="attributes"] ``` -/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/5.0/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ +/usr/ivory-5/bin/pg_upgrade --old-datadir=/home/ivorysql/test/4.6/data --new-datadir=/home/ivorysql/test/{ivorysql-version}/data --old-bindir=/usr/ivory-4/bin/ --new-bindir=/usr/ivory-5/bin/ ``` Seeing "Upgrade Complete" indicates that the upgrade has been successfully completed. @@ -142,7 +145,7 @@ This upgrade method can be used with built-in logical replication tools and exte == Managing IvorySQL Versions -IvorySQL is based on PostgreSQL and is updated at the same frequency as PostgreSQL, with one major release per year and one minor release per quarter. IvorySQL 5.0 is based on PostgreSQL 18.0, and all versions of IvorySQL are backward compatible.The relevant version features can be viewed by looking at https://www.ivorysql.org/en/releases-page/[Official Website]。 +IvorySQL is based on PostgreSQL and is updated at the same frequency as PostgreSQL, with one major release per year and one minor release per quarter. IvorySQL {ivorysql-version} is based on PostgreSQL {pg-version}, and all versions of IvorySQL are backward compatible.The relevant version features can be viewed by looking at https://www.ivorysql.org/en/releases-page/[Official Website]。 == Managing IvorySQL database access diff --git a/EN/modules/ROOT/pages/master/4.5.adoc b/EN/modules/ROOT/pages/v5.1/4.5.adoc similarity index 99% rename from EN/modules/ROOT/pages/master/4.5.adoc rename to EN/modules/ROOT/pages/v5.1/4.5.adoc index 066e32f3..4591ac15 100644 --- a/EN/modules/ROOT/pages/master/4.5.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.5.adoc @@ -451,6 +451,7 @@ Export HR and SCOTT user data in the same way. Create ORCL database +[source,subs="attributes"] ``` # su - ivorysql @@ -460,7 +461,7 @@ $ createdb orcl $ psql -psql (18.0) +psql ({pg-version}) Type "help" for help. @@ -486,10 +487,11 @@ ivorysql=# Create SH, HR, SCOTT users: +[source,subs="attributes"] ``` $ psql orcl -psql (18.0) +psql ({pg-version}) Type "help" for help. diff --git a/EN/modules/ROOT/pages/master/4.6.1.adoc b/EN/modules/ROOT/pages/v5.1/4.6.1.adoc similarity index 96% rename from EN/modules/ROOT/pages/master/4.6.1.adoc rename to EN/modules/ROOT/pages/v5.1/4.6.1.adoc index de4757c9..4a78231d 100644 --- a/EN/modules/ROOT/pages/master/4.6.1.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.6.1.adoc @@ -51,6 +51,7 @@ statefulset.apps/ivorysql 1/1 2m39s ``` Connect to IvorySQL via its PostgreSQL port using the psql +[source,bash,subs="attributes"] ``` [root@k8s-master single]# psql -U ivorysql -p 32106 -h 127.0.0.1 -d ivorysql Password for user ivorysql: @@ -58,7 +59,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -71,6 +72,7 @@ ivorysql=# exit ``` Connect to IvorySQL's Oracle-compatible port using psql. +[source,bash,subs="attributes"] ``` [root@k8s-master single]# psql -U ivorysql -p 31887 -h 127.0.0.1 -d ivorysql Password for user ivorysql: @@ -78,7 +80,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; diff --git a/EN/modules/ROOT/pages/master/4.6.2.adoc b/EN/modules/ROOT/pages/v5.1/4.6.2.adoc similarity index 99% rename from EN/modules/ROOT/pages/master/4.6.2.adoc rename to EN/modules/ROOT/pages/v5.1/4.6.2.adoc index bcd1adf0..ba207abf 100644 --- a/EN/modules/ROOT/pages/master/4.6.2.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.6.2.adoc @@ -237,7 +237,8 @@ and not otherwise in use or the operation will fail. Additionally, be aware that will win in case of conflicts with any annotations or labels a user configures elsewhere. Finally, if you are exposing your Services externally and are relying on TLS -verification, you will need to use the https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[custom TLS] +verification, you will need to use the +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[custom TLS] features of IVYO). === Connect an Application @@ -2030,7 +2031,8 @@ cluster should be accessible via the network and allow TLS authentication (TLS i In the following manifest, we have `standby.enabled` set to `true` and have provided both the `host` and `port` that point to the primary cluster. We have also defined `customTLSSecret` and `customReplicationTLSSecret` to provide certs that allow the standby to authenticate to the primary. -For this type of standby, you must use https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[custom TLS]: +For this type of standby, you must use +https://github.com/IvorySQL/ivory-operator/blob/master/docs/content/tutorial/customize-cluster.md#customize-tls[custom TLS]: [source,yaml] ---- @@ -2557,7 +2559,7 @@ Kubernetes will detect the changes and begin to deploy a new Keycloak Pod. When === TLS -IVYO deploys every cluster and component over TLS. This includes the PgBouncer connection pooler. If you are using your own xref:./customize-cluster.md#customize-tls[custom TLS setup], you will need to provide a Secret reference for a TLS key / certificate pair for PgBouncer in `spec.proxy.pgBouncer.customTLSSecret`. +IVYO deploys every cluster and component over TLS. This includes the PgBouncer connection pooler. If you are using your own custom TLS setup, you will need to provide a Secret reference for a TLS key / certificate pair for PgBouncer in `spec.proxy.pgBouncer.customTLSSecret`. Your TLS certificate for PgBouncer should have a Common Name (CN) setting that matches the PgBouncer Service name. This is the name of the cluster suffixed with `-pgbouncer`. For example, for our `hippo` cluster this would be `hippo-pgbouncer`. For the `keycloakdb` example, it would be `keycloakdb-pgbouncer`. diff --git a/EN/modules/ROOT/pages/master/4.6.3.adoc b/EN/modules/ROOT/pages/v5.1/4.6.3.adoc similarity index 91% rename from EN/modules/ROOT/pages/master/4.6.3.adoc rename to EN/modules/ROOT/pages/v5.1/4.6.3.adoc index f438c2d6..5cb6e3e0 100644 --- a/EN/modules/ROOT/pages/master/4.6.3.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.6.3.adoc @@ -65,6 +65,7 @@ fr0m9chu3ce8 ivorysql-hac_ivypatroni2 replicated 1/1 ivorysql/docke ``` Connect to the database using psql via Oracle port and PostgreSQL port +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p1521 -U ivorysql -d ivorysql Password for user ivorysql: @@ -72,7 +73,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -83,6 +84,7 @@ ivorysql=# show ivorysql.compatible_mode; ivorysql=# exit ``` +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p5432 -U ivorysql -d ivorysql Password for user ivorysql: @@ -90,7 +92,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -149,6 +151,7 @@ CONTAINER ID IMAGE COMMAND At this point, the one-primary-two-standby cluster setup is complete. Connect to the database using psql via Oracle-compatible ports and PostgreSQL ports. +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p1521 -U ivorysql -d ivorysql Password for user ivorysql: @@ -156,7 +159,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; @@ -167,6 +170,7 @@ ivorysql=# show ivorysql.compatible_mode; ivorysql=# exit ``` +[source,bash,subs="attributes"] ``` [root@manager-node1 docker-swarm]# psql -h127.0.0.1 -p5432 -U ivorysql -d ivorysql Password for user ivorysql: @@ -174,7 +178,7 @@ Password for user ivorysql: ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# show ivorysql.compatible_mode; diff --git a/EN/modules/ROOT/pages/master/4.6.4.adoc b/EN/modules/ROOT/pages/v5.1/4.6.4.adoc similarity index 63% rename from EN/modules/ROOT/pages/master/4.6.4.adoc rename to EN/modules/ROOT/pages/v5.1/4.6.4.adoc index d3255e3e..4c15bc2b 100644 --- a/EN/modules/ROOT/pages/master/4.6.4.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.6.4.adoc @@ -7,29 +7,37 @@ == Running IvorySQL in docker ** Get IvorySQL image from Docker Hub + +[source,bash,subs="attributes"] ``` -$ docker pull ivorysql/ivorysql:5.0-ubi8 +$ docker pull ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Running IvorySQL + +[source,bash,subs="attributes"] ``` -$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/ivorysql:5.0-ubi8 +$ docker run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=your_password -d ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Check if the IvorySQL container is running successfully + +[source,bash,subs="attributes"] ``` $ docker ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -6faa2d0ed705 ivorysql:5.0-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql +6faa2d0ed705 IvorySQL {ivorysql-version}-ubi8 "docker-entrypoint.s…" 50 seconds ago Up 49 seconds 5866/tcp, 0.0.0.0:5434->5432/tcp ivorysql ``` == Running with Podman ** Pull IvorySQL Image from Docker Hub + +[source,bash,subs="attributes"] ``` -[highgo@manager-node1 ~]$ podman pull ivorysql/ivorysql:5.0-ubi8 -✔ docker.io/ivorysql/ivorysql:5.0-ubi8 -Trying to pull docker.io/ivorysql/ivorysql:5.0-ubi8... +[highgo@manager-node1 ~]$ podman pull ivorysql/IvorySQL {ivorysql-version}-ubi8 +✔ docker.io/ivorysql/IvorySQL {ivorysql-version}-ubi8 +Trying to pull docker.io/ivorysql/IvorySQL {ivorysql-version}-ubi8... Getting image source signatures Copying blob 5885448c5c88 done | Copying blob 6c502b378234 done | @@ -49,22 +57,26 @@ Writing manifest to image destination ``` ** Run IvorySQL Container + +[source,bash,subs="attributes"] ``` -$ podman run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=123456 -d ivorysql/ivorysql:5.0-ubi8 +$ podman run --name ivorysql -p 5434:5432 -e IVORYSQL_PASSWORD=123456 -d ivorysql/IvorySQL {ivorysql-version}-ubi8 ``` ** Check if IvorySQL Container is Running Successfully + +[source,bash,subs="attributes"] ``` [highgo@manager-node1 ~]$ podman ps | grep ivorysql CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -368dee58d5ef docker.io/ivorysql/ivorysql:5.0-ubi8 postgres 20 seconds ago Up 20 seconds 0.0.0.0:5434->5432/tcp, 1521/tcp, 5866/tcp ivorysql +368dee58d5ef docker.io/ivorysql/IvorySQL {ivorysql-version}-ubi8 postgres 20 seconds ago Up 20 seconds 0.0.0.0:5434->5432/tcp, 1521/tcp, 5866/tcp ivorysql [highgo@manager-node1 ~]$ podman exec -it ivorysql /bin/bash [root@8cc631eb413d /]# ivorysql=# select version(); version ------------------------------------------------------------------------------------------------------------------------ - PostgreSQL 18.0 (IvorySQL 5.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit + PostgreSQL 18.0 (IvorySQL {ivorysql-version}) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit (1 row) ivorysql=# diff --git a/EN/modules/ROOT/pages/master/4.7.1.adoc b/EN/modules/ROOT/pages/v5.1/4.7.1.adoc similarity index 98% rename from EN/modules/ROOT/pages/master/4.7.1.adoc rename to EN/modules/ROOT/pages/v5.1/4.7.1.adoc index cd9d9b10..251a4093 100644 --- a/EN/modules/ROOT/pages/master/4.7.1.adoc +++ b/EN/modules/ROOT/pages/v5.1/4.7.1.adoc @@ -25,7 +25,7 @@ The IvorySQL Cloud platform currently supports installation on Linux systems. Th |Backend |cloudnative-1.0-SNAPSHOT.jar |K8S cluster a| [arabic] -. docker.io/ivorysql/ivory-operator:v5.0 +. docker.io/ivorysql/ivory-operator:v{ivorysql-version} . docker.io/ivorysql/pgadmin:ubi8-9.9-5.0-1 . docker.io/ivorysql/pgbackrest:ubi8-2.56.0-5.0-1 . docker.io/ivorysql/postgres-exporter:ubi8-0.17.0-5.0-1 @@ -201,7 +201,7 @@ npm run build:prod Edit the configuration file: -[literal] +[literal,subs="attributes"] ---- [root@cloud dist]# pwd @@ -229,7 +229,7 @@ disableNative = false dbtype = "IvorySQL" -dbversion = "5.0" +dbversion = "{ivorysql-version}" ---- === Install and configure NGINX diff --git a/EN/modules/ROOT/pages/master/4.7.2.adoc b/EN/modules/ROOT/pages/v5.1/4.7.2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/4.7.2.adoc rename to EN/modules/ROOT/pages/v5.1/4.7.2.adoc diff --git a/EN/modules/ROOT/pages/master/4.7.adoc b/EN/modules/ROOT/pages/v5.1/4.7.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/4.7.adoc rename to EN/modules/ROOT/pages/v5.1/4.7.adoc diff --git a/EN/modules/ROOT/pages/v5.1/5.0.adoc b/EN/modules/ROOT/pages/v5.1/5.0.adoc new file mode 100644 index 00000000..840f3c07 --- /dev/null +++ b/EN/modules/ROOT/pages/v5.1/5.0.adoc @@ -0,0 +1,29 @@ +:sectnums: +:sectnumlevels: 5 + + +[discrete] +== IvorySQL Ecosystem Plugin Compatibility List + +IvorySQL, as an advanced open-source database compatible with Oracle and based on PostgreSQL, has powerful extension capabilities and supports a rich ecosystem of plugins. These plugins can help users enhance database functionality in different scenarios, including geospatial information processing, vector retrieval, full-text search, data definition extraction, and path planning. The following is a list of major plugins currently officially compatible with and supported by IvorySQL: + ++ + +[cols="1,2,1,3,3"] +|==== +|*Index*|*Plugin Name*|*Version*|*Function Description*|*Use Cases* +|*1*| xref:v{ivorysql-version}/5.1.adoc[postgis] | 3.5.4 | Provides geospatial data support for IvorySQL, including spatial indexes, spatial functions, and geographic object storage | Geographic Information Systems (GIS), map services, location data analysis +|*2*| xref:v{ivorysql-version}/5.2.adoc[pgvector] | 0.8.1 | Supports vector similarity search, can be used to store and retrieve high-dimensional vector data| AI applications, image retrieval, recommendation systems, semantic search +|*3*| xref:v{ivorysql-version}/5.3.adoc[pgddl (DDL Extractor)] | 0.31 | Extracts DDL (Data Definition Language) statements from databases, facilitating version management and migration | Database version control, CI/CD integration, structure comparison and synchronization +|*4*| xref:v{ivorysql-version}/5.4.adoc[pg_cron]​ | 1.6.0 | Provides database-internal scheduled task scheduling functionality, supports regular SQL statement execution | Data cleanup, regular statistics, automated maintenance tasks +|*5*| xref:v{ivorysql-version}/5.5.adoc[pgsql-http]​ | 1.7.0 | Allows HTTP requests to be initiated in SQL, interacting with external web services | Data collection, API integration, microservice calls +|*6*| xref:v{ivorysql-version}/5.6.adoc[plpgsql_check] | 2.8 | Provides static analysis functionality for PL/pgSQL code, can detect potential errors during development | Stored procedure development, code quality checking, debugging and optimization +|*7*| xref:v{ivorysql-version}/5.7.adoc[pgroonga] | 4.0.4 | Provides full-text search functionality for non-English languages, meeting the needs of high-performance applications | Full-text search capabilities for languages like Chinese, Japanese, and Korean +|*8*| xref:v{ivorysql-version}/5.8.adoc[pgaudit] | 18.0 | Provides fine-grained auditing, recording database operation logs to support security auditing and compliance checks | Database security auditing, compliance checks, audit report generation +|*9*| xref:v{ivorysql-version}/5.9.adoc[pgrouting] | 3.8.0 | Provides routing computation for geospatial data, supporting multiple algorithms and data formats | Geospatial analysis, route planning, logistics optimization +|*10*| xref:v{ivorysql-version}/5.10.adoc[system_stats] | 3.2 | Provide functions for accessing system-level statistics. | system monitor +|==== + +These plugins have all been tested and adapted by the IvorySQL team to ensure stable operation in the IvorySQL environment. Users can select appropriate plugins based on business needs to further enhance the capabilities and flexibility of the database system. + +We will continue to expand and enrich the IvorySQL plugin ecosystem. Community developers are welcome to submit new plugin adaptation suggestions or code contributions. For more detailed usage methods and the latest compatible versions of each plugin, please refer to the corresponding documentation chapters for each plugin. diff --git a/EN/modules/ROOT/pages/master/5.1.adoc b/EN/modules/ROOT/pages/v5.1/5.1.adoc similarity index 95% rename from EN/modules/ROOT/pages/master/5.1.adoc rename to EN/modules/ROOT/pages/v5.1/5.1.adoc index e458040f..ee7c9b32 100644 --- a/EN/modules/ROOT/pages/master/5.1.adoc +++ b/EN/modules/ROOT/pages/v5.1/5.1.adoc @@ -14,7 +14,7 @@ Users can select the installation method for PostGIS that best suits their devel In addition to the installation methods provided by the PostGIS community, the IvorySQL community also offers a source code installation method, with Ubuntu 24.04 (x86_64) as the installation environment. [NOTE] -Please ensure that **IvorySQL 5.0 or above** is installed in the environment. +Please ensure that **IvorySQL {ivorysql-version} or above** is installed in the environment. ** Install dependencies [literal] diff --git a/EN/modules/ROOT/pages/master/5.10.adoc b/EN/modules/ROOT/pages/v5.1/5.10.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.10.adoc rename to EN/modules/ROOT/pages/v5.1/5.10.adoc diff --git a/EN/modules/ROOT/pages/master/5.2.adoc b/EN/modules/ROOT/pages/v5.1/5.2.adoc similarity index 99% rename from EN/modules/ROOT/pages/master/5.2.adoc rename to EN/modules/ROOT/pages/v5.1/5.2.adoc index ae513558..1869c685 100644 --- a/EN/modules/ROOT/pages/master/5.2.adoc +++ b/EN/modules/ROOT/pages/v5.1/5.2.adoc @@ -57,10 +57,10 @@ sudo --preserve-env=PG_CONFIG make install ** Create pgvector extension + -[literal] +[literal,subs="attributes"] ---- [ivorysql@localhost ivorysql-5]$ psql -psql (18.0) +psql ({pg-version}) Type "help" for help. ivorysql=# create extension vector; diff --git a/EN/modules/ROOT/pages/master/5.3.adoc b/EN/modules/ROOT/pages/v5.1/5.3.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.3.adoc rename to EN/modules/ROOT/pages/v5.1/5.3.adoc diff --git a/EN/modules/ROOT/pages/master/5.4.adoc b/EN/modules/ROOT/pages/v5.1/5.4.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.4.adoc rename to EN/modules/ROOT/pages/v5.1/5.4.adoc diff --git a/EN/modules/ROOT/pages/master/5.5.adoc b/EN/modules/ROOT/pages/v5.1/5.5.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.5.adoc rename to EN/modules/ROOT/pages/v5.1/5.5.adoc diff --git a/EN/modules/ROOT/pages/master/5.6.adoc b/EN/modules/ROOT/pages/v5.1/5.6.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.6.adoc rename to EN/modules/ROOT/pages/v5.1/5.6.adoc diff --git a/EN/modules/ROOT/pages/master/5.7.adoc b/EN/modules/ROOT/pages/v5.1/5.7.adoc similarity index 95% rename from EN/modules/ROOT/pages/master/5.7.adoc rename to EN/modules/ROOT/pages/v5.1/5.7.adoc index 987f3242..cfc5a6e3 100644 --- a/EN/modules/ROOT/pages/master/5.7.adoc +++ b/EN/modules/ROOT/pages/v5.1/5.7.adoc @@ -19,10 +19,11 @@ The IvorySQL community provides source code installation steps, demonstrated bel === Dependencies Setup Environment +[literal,subs="attributes"] ``` Operating System: Ubuntu 24.04 CPU Architecture: x86_64 - IvorySQL: v5.0 + IvorySQL: v{ivorysql-version} ``` ==== Install msgpack-c @@ -71,6 +72,7 @@ Then execute the following commands to compile and install: == Create Extension PGroonga and Confirm the version Connect to the database with `psql` in `pg` mode and execute the following commands: +[source,subs="attributes"] ```sql postgres=# CREATE extension pgroonga; CREATE EXTENSION @@ -83,7 +85,7 @@ postgres=# SELECT * FROM pg_available_extensions WHERE name = 'pgroonga'; postgres=# select version(); version -------------------------------------------------------------------------------- - PostgreSQL (IvorySQL 5.0) 18.0 on x86_64-linux, compiled by gcc-13.3.0, 64-bit + PostgreSQL (IvorySQL {ivorysql-version}) 18.0 on x86_64-linux, compiled by gcc-13.3.0, 64-bit (1 row) ``` diff --git a/EN/modules/ROOT/pages/master/5.8.adoc b/EN/modules/ROOT/pages/v5.1/5.8.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/5.8.adoc rename to EN/modules/ROOT/pages/v5.1/5.8.adoc diff --git a/EN/modules/ROOT/pages/master/5.9.adoc b/EN/modules/ROOT/pages/v5.1/5.9.adoc similarity index 94% rename from EN/modules/ROOT/pages/master/5.9.adoc rename to EN/modules/ROOT/pages/v5.1/5.9.adoc index 6235290a..8da744f3 100644 --- a/EN/modules/ROOT/pages/master/5.9.adoc +++ b/EN/modules/ROOT/pages/v5.1/5.9.adoc @@ -13,7 +13,7 @@ pgRouting is widely used in logistics and distribution, traffic navigation, netw == Installation [TIP] -IvorySQL 5.0 or higher version is already installed in the environment, with the installation path at /usr/local/ivorysql/ivorysql-5 +IvorySQL {ivorysql-version} or higher version is already installed in the environment, with the installation path at /usr/local/ivorysql/ivorysql-5 === Source Installation diff --git a/EN/modules/ROOT/pages/master/6.1.1.adoc b/EN/modules/ROOT/pages/v5.1/6.1.1.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.1.1.adoc rename to EN/modules/ROOT/pages/v5.1/6.1.1.adoc diff --git a/EN/modules/ROOT/pages/master/6.2.1.adoc b/EN/modules/ROOT/pages/v5.1/6.2.1.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.2.1.adoc rename to EN/modules/ROOT/pages/v5.1/6.2.1.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.1.adoc b/EN/modules/ROOT/pages/v5.1/6.3.1.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.1.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.1.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.10.adoc b/EN/modules/ROOT/pages/v5.1/6.3.10.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.10.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.10.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.11.adoc b/EN/modules/ROOT/pages/v5.1/6.3.11.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.11.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.11.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.12.adoc b/EN/modules/ROOT/pages/v5.1/6.3.12.adoc similarity index 99% rename from EN/modules/ROOT/pages/master/6.3.12.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.12.adoc index 6ee5244c..125a1515 100644 --- a/EN/modules/ROOT/pages/master/6.3.12.adoc +++ b/EN/modules/ROOT/pages/v5.1/6.3.12.adoc @@ -136,7 +136,7 @@ typedef enum IvyStmtType { IVY_STMT_UNKNOW, IVY_STMT_DO, - IVY_STMT_DOFROMCALL, /* new statementt type */ + IVY_STMT_DOFROMCALL, /* new statement type */ IVY_STMT_DOHANDLED, IVY_STMT_OTHERS } IvyStmtType; diff --git a/EN/modules/ROOT/pages/master/6.3.2.adoc b/EN/modules/ROOT/pages/v5.1/6.3.2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.2.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.2.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.3.adoc b/EN/modules/ROOT/pages/v5.1/6.3.3.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.3.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.3.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.4.adoc b/EN/modules/ROOT/pages/v5.1/6.3.4.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.4.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.4.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.5.adoc b/EN/modules/ROOT/pages/v5.1/6.3.5.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.5.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.5.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.6.adoc b/EN/modules/ROOT/pages/v5.1/6.3.6.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.6.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.6.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.7.adoc b/EN/modules/ROOT/pages/v5.1/6.3.7.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.7.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.7.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.8.adoc b/EN/modules/ROOT/pages/v5.1/6.3.8.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.8.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.8.adoc diff --git a/EN/modules/ROOT/pages/master/6.3.9.adoc b/EN/modules/ROOT/pages/v5.1/6.3.9.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.3.9.adoc rename to EN/modules/ROOT/pages/v5.1/6.3.9.adoc diff --git a/EN/modules/ROOT/pages/master/6.4.1.adoc b/EN/modules/ROOT/pages/v5.1/6.4.1.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.4.1.adoc rename to EN/modules/ROOT/pages/v5.1/6.4.1.adoc diff --git a/EN/modules/ROOT/pages/master/6.4.2.adoc b/EN/modules/ROOT/pages/v5.1/6.4.2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.4.2.adoc rename to EN/modules/ROOT/pages/v5.1/6.4.2.adoc diff --git a/EN/modules/ROOT/pages/master/6.5.adoc b/EN/modules/ROOT/pages/v5.1/6.5.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/6.5.adoc rename to EN/modules/ROOT/pages/v5.1/6.5.adoc diff --git a/EN/modules/ROOT/pages/master/7.1.adoc b/EN/modules/ROOT/pages/v5.1/7.1.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.1.adoc rename to EN/modules/ROOT/pages/v5.1/7.1.adoc diff --git a/EN/modules/ROOT/pages/master/7.10.adoc b/EN/modules/ROOT/pages/v5.1/7.10.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.10.adoc rename to EN/modules/ROOT/pages/v5.1/7.10.adoc diff --git a/EN/modules/ROOT/pages/master/7.11.adoc b/EN/modules/ROOT/pages/v5.1/7.11.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.11.adoc rename to EN/modules/ROOT/pages/v5.1/7.11.adoc diff --git a/EN/modules/ROOT/pages/master/7.12.adoc b/EN/modules/ROOT/pages/v5.1/7.12.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.12.adoc rename to EN/modules/ROOT/pages/v5.1/7.12.adoc diff --git a/EN/modules/ROOT/pages/master/7.13.adoc b/EN/modules/ROOT/pages/v5.1/7.13.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.13.adoc rename to EN/modules/ROOT/pages/v5.1/7.13.adoc diff --git a/EN/modules/ROOT/pages/master/7.14.adoc b/EN/modules/ROOT/pages/v5.1/7.14.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.14.adoc rename to EN/modules/ROOT/pages/v5.1/7.14.adoc diff --git a/EN/modules/ROOT/pages/master/7.15.adoc b/EN/modules/ROOT/pages/v5.1/7.15.adoc similarity index 97% rename from EN/modules/ROOT/pages/master/7.15.adoc rename to EN/modules/ROOT/pages/v5.1/7.15.adoc index d7b6498f..45cf39ea 100644 --- a/EN/modules/ROOT/pages/master/7.15.adoc +++ b/EN/modules/ROOT/pages/v5.1/7.15.adoc @@ -1,149 +1,149 @@ -:sectnums: -:sectnumlevels: 5 - -:imagesdir: ./_images - -= out parameter - -== Objective - -IvorySQL provides Oracle-compatible OUT parameter functionality, including functions and procedures with OUT parameters, support for OUT parameters in anonymous blocks, and libpq support for OUT parameters. - -This document aims to introduce the functionality of OUT parameters to users. - -== Function descriptions - -IvorySQL provides Oracle-compatible OUT parameter functionality, including the following features. - -=== functions with OUT parameters - -Syntax: -``` -CREATE [ OR REPLACE ] FUNCTION - name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) - [ RETURNS rettype - | RETURNS TABLE ( column_name column_type [, ...] ) ] - { LANGUAGE lang_name - | TRANSFORM { FOR TYPE type_name } [, ... ] - | WINDOW - | { IMMUTABLE | STABLE | VOLATILE } - | [ NOT ] LEAKPROOF - | { CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT } - | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER } - | PARALLEL { UNSAFE | RESTRICTED | SAFE } - | COST execution_cost - | ROWS result_rows - | SUPPORT support_function - | SET configuration_parameter { TO value | = value | FROM CURRENT } - | AS 'definition' - | AS 'obj_file', 'link_symbol' - | sql_body - } ... -``` -The argmode can be IN, OUT, INOUT (IN OUT), or VARIADIC. If not specified, the default is IN. The argmode can also be written after the argname. - -Unlike native PostgreSQL, Oracle-compatible OUT parameters are not associated with the return value data type. Neither IN OUT nor OUT modes can have default values. If there are OUT parameters and the function's return type is not void, the function body must include a RETURN statement. - -=== support for OUT parameters in anonymous blocks - -Supports binding variables in the form of colon placeholders, such as :1, :name. - -Added new DO+USING syntax: DO [ LANGUAGE lang_name ] code [USING IN | OUT | IN OUT, ...] - -Supports binding variables in libpq by position and by parameter name, providing the system function get_parameter_description, which returns the relationship between variable names and their positions based on the SQL statement. - -=== calling functions with OUT parameters in libpq - -The libpq interface provides functions for preparing, binding, and executing statements, which are similar to the corresponding OCI functions. -The usage process is as follows: - -Use IvyHandleAlloc to allocate statement and error handles. -Call IvyStmtPrepare to prepare the statement. -Call IvyBindByPos or IvyBindByName to bind parameters. -Call IvyStmtExecute to execute, which can be repeated. -Call IvyFreeHandle to release the statement and error handles. - -Additionally, a series of interface functions have been implemented, including Ivyconnectdb, Ivystatus, Ivyexec, IvyresultStatus, IvyCreatePreparedStatement, IvybindOutParameterByPos, IvyexecPreparedStatement, IvyexecPreparedStatement2, Ivynfields, Ivyntuples, and Ivyclear. - -Example programs can be found in the src/interfaces/libpq/ivytest directory of the source code. - -== test examples - -=== functions with OUT parameters -1. OUT parameters are not associated with the return value data type -``` -ivorysql=# create or replace function test_return_out(id integer,price out integer,name out varchar) return varchar -ivorysql-# as -ivorysql-# begin -ivorysql-# price := 20000; -ivorysql-# name := 'test a char out'; -ivorysql-# return 'welcome to QingDao'; -ivorysql-# end; -ivorysql-# / -CREATE FUNCTION -``` - -2. Neither IN OUT nor OUT modes can have default values -``` -ivorysql=# create or replace function test_return_inout(id integer,price in out integer default 100,name out varchar) return varchar -ivorysql-# as -ivorysql-# begin -ivorysql-# price := 20000 + price; -ivorysql-# name := 'this is a test'; -ivorysql-# return 'welcome to QingDao'; -ivorysql-# end; -ivorysql-# / -ERROR: IN OUT formal parameters may have no default expressions -``` - -3. If there are OUT parameters and the function's return type is not void, the function body must include a RETURN statement. -``` ---if function's return type is non-void, the function body must has RETURN statement ---if there is no RETURN statement, the function can be created, but when it is called, ---an error is raised -ivorysql=# create or replace function f2(id integer,price out integer) return varchar -ivorysql-# as -ivorysql-# begin -ivorysql-# price := 2; -ivorysql-# end; -ivorysql-# / -CREATE FUNCTION -ivorysql=# declare -ivorysql-# a varchar(20); -ivorysql-# b int; -ivorysql-# begin -ivorysql-# a := f2(1, b); -ivorysql-# end; -ivorysql-# / -ERROR: Function returned without value -CONTEXT: PL/iSQL function f2(pg_catalog.int4,pg_catalog.int4) line 0 at RETURN -PL/iSQL function inline_code_block line 5 at assignment -``` - -=== support OUT parameters in anonymous block -1. Supports binding variables in the form of colon placeholders and new DO+USING syntax -``` -ivorysql=# do $$ -ivorysql$# declare -ivorysql$# a int; -ivorysql$# begin -ivorysql$# :x := 1; -ivorysql$# :y := 2; -ivorysql$# end; $$ using out, out; - $1 | $2 -----+---- - 1 | 2 -(1 row) -``` -2. system function get_parameter_descr() -``` -ivorysql=# select * from get_parameter_description('insert into t values(:x,:y)'); - name | position --------+---------- - false | 0 - :x | 1 - :y | 2 -(3 rows) -``` - - +:sectnums: +:sectnumlevels: 5 + +:imagesdir: ./_images + += out parameter + +== Objective + +IvorySQL provides Oracle-compatible OUT parameter functionality, including functions and procedures with OUT parameters, support for OUT parameters in anonymous blocks, and libpq support for OUT parameters. + +This document aims to introduce the functionality of OUT parameters to users. + +== Function descriptions + +IvorySQL provides Oracle-compatible OUT parameter functionality, including the following features. + +=== functions with OUT parameters + +Syntax: +``` +CREATE [ OR REPLACE ] FUNCTION + name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) + [ RETURNS rettype + | RETURNS TABLE ( column_name column_type [, ...] ) ] + { LANGUAGE lang_name + | TRANSFORM { FOR TYPE type_name } [, ... ] + | WINDOW + | { IMMUTABLE | STABLE | VOLATILE } + | [ NOT ] LEAKPROOF + | { CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT } + | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER } + | PARALLEL { UNSAFE | RESTRICTED | SAFE } + | COST execution_cost + | ROWS result_rows + | SUPPORT support_function + | SET configuration_parameter { TO value | = value | FROM CURRENT } + | AS 'definition' + | AS 'obj_file', 'link_symbol' + | sql_body + } ... +``` +The argmode can be IN, OUT, INOUT (IN OUT), or VARIADIC. If not specified, the default is IN. The argmode can also be written after the argname. + +Unlike native PostgreSQL, Oracle-compatible OUT parameters are not associated with the return value data type. Neither IN OUT nor OUT modes can have default values. If there are OUT parameters and the function's return type is not void, the function body must include a RETURN statement. + +=== support for OUT parameters in anonymous blocks + +Supports binding variables in the form of colon placeholders, such as :1, :name. + +Added new DO+USING syntax: DO [ LANGUAGE lang_name ] code [USING IN | OUT | IN OUT, ...] + +Supports binding variables in libpq by position and by parameter name, providing the system function get_parameter_description, which returns the relationship between variable names and their positions based on the SQL statement. + +=== calling functions with OUT parameters in libpq + +The libpq interface provides functions for preparing, binding, and executing statements, which are similar to the corresponding OCI functions. +The usage process is as follows: + +Use IvyHandleAlloc to allocate statement and error handles. +Call IvyStmtPrepare to prepare the statement. +Call IvyBindByPos or IvyBindByName to bind parameters. +Call IvyStmtExecute to execute, which can be repeated. +Call IvyFreeHandle to release the statement and error handles. + +Additionally, a series of interface functions have been implemented, including Ivyconnectdb, Ivystatus, Ivyexec, IvyresultStatus, IvyCreatePreparedStatement, IvybindOutParameterByPos, IvyexecPreparedStatement, IvyexecPreparedStatement2, Ivynfields, Ivyntuples, and Ivyclear. + +Example programs can be found in the src/interfaces/libpq/ivytest directory of the source code. + +== test examples + +=== functions with OUT parameters +1. OUT parameters are not associated with the return value data type +``` +ivorysql=# create or replace function test_return_out(id integer,price out integer,name out varchar) return varchar +ivorysql-# as +ivorysql-# begin +ivorysql-# price := 20000; +ivorysql-# name := 'test a char out'; +ivorysql-# return 'welcome to QingDao'; +ivorysql-# end; +ivorysql-# / +CREATE FUNCTION +``` + +2. Neither IN OUT nor OUT modes can have default values +``` +ivorysql=# create or replace function test_return_inout(id integer,price in out integer default 100,name out varchar) return varchar +ivorysql-# as +ivorysql-# begin +ivorysql-# price := 20000 + price; +ivorysql-# name := 'this is a test'; +ivorysql-# return 'welcome to QingDao'; +ivorysql-# end; +ivorysql-# / +ERROR: IN OUT formal parameters may have no default expressions +``` + +3. If there are OUT parameters and the function's return type is not void, the function body must include a RETURN statement. +``` +--if function's return type is non-void, the function body must has RETURN statement +--if there is no RETURN statement, the function can be created, but when it is called, +--an error is raised +ivorysql=# create or replace function f2(id integer,price out integer) return varchar +ivorysql-# as +ivorysql-# begin +ivorysql-# price := 2; +ivorysql-# end; +ivorysql-# / +CREATE FUNCTION +ivorysql=# declare +ivorysql-# a varchar(20); +ivorysql-# b int; +ivorysql-# begin +ivorysql-# a := f2(1, b); +ivorysql-# end; +ivorysql-# / +ERROR: Function returned without value +CONTEXT: PL/iSQL function f2(pg_catalog.int4,pg_catalog.int4) line 0 at RETURN +PL/iSQL function inline_code_block line 5 at assignment +``` + +=== support OUT parameters in anonymous block +1. Supports binding variables in the form of colon placeholders and new DO+USING syntax +``` +ivorysql=# do $$ +ivorysql$# declare +ivorysql$# a int; +ivorysql$# begin +ivorysql$# :x := 1; +ivorysql$# :y := 2; +ivorysql$# end; $$ using out, out; + $1 | $2 +----+---- + 1 | 2 +(1 row) +``` +2. system function get_parameter_descr() +``` +ivorysql=# select * from get_parameter_description('insert into t values(:x,:y)'); + name | position +-------+---------- + false | 0 + :x | 1 + :y | 2 +(3 rows) +``` + + diff --git a/EN/modules/ROOT/pages/master/7.16.adoc b/EN/modules/ROOT/pages/v5.1/7.16.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.16.adoc rename to EN/modules/ROOT/pages/v5.1/7.16.adoc diff --git a/EN/modules/ROOT/pages/master/7.17.adoc b/EN/modules/ROOT/pages/v5.1/7.17.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.17.adoc rename to EN/modules/ROOT/pages/v5.1/7.17.adoc diff --git a/EN/modules/ROOT/pages/master/7.18.adoc b/EN/modules/ROOT/pages/v5.1/7.18.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.18.adoc rename to EN/modules/ROOT/pages/v5.1/7.18.adoc diff --git a/EN/modules/ROOT/pages/master/7.19.adoc b/EN/modules/ROOT/pages/v5.1/7.19.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.19.adoc rename to EN/modules/ROOT/pages/v5.1/7.19.adoc diff --git a/EN/modules/ROOT/pages/master/7.2.adoc b/EN/modules/ROOT/pages/v5.1/7.2.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.2.adoc rename to EN/modules/ROOT/pages/v5.1/7.2.adoc diff --git a/EN/modules/ROOT/pages/master/7.20.adoc b/EN/modules/ROOT/pages/v5.1/7.20.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.20.adoc rename to EN/modules/ROOT/pages/v5.1/7.20.adoc diff --git a/EN/modules/ROOT/pages/master/7.21.adoc b/EN/modules/ROOT/pages/v5.1/7.21.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.21.adoc rename to EN/modules/ROOT/pages/v5.1/7.21.adoc diff --git a/EN/modules/ROOT/pages/master/7.22.adoc b/EN/modules/ROOT/pages/v5.1/7.22.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.22.adoc rename to EN/modules/ROOT/pages/v5.1/7.22.adoc diff --git a/EN/modules/ROOT/pages/master/7.3.adoc b/EN/modules/ROOT/pages/v5.1/7.3.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.3.adoc rename to EN/modules/ROOT/pages/v5.1/7.3.adoc diff --git a/EN/modules/ROOT/pages/master/7.4.adoc b/EN/modules/ROOT/pages/v5.1/7.4.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.4.adoc rename to EN/modules/ROOT/pages/v5.1/7.4.adoc diff --git a/EN/modules/ROOT/pages/master/7.5.adoc b/EN/modules/ROOT/pages/v5.1/7.5.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.5.adoc rename to EN/modules/ROOT/pages/v5.1/7.5.adoc diff --git a/EN/modules/ROOT/pages/master/7.6.adoc b/EN/modules/ROOT/pages/v5.1/7.6.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.6.adoc rename to EN/modules/ROOT/pages/v5.1/7.6.adoc diff --git a/EN/modules/ROOT/pages/master/7.7.adoc b/EN/modules/ROOT/pages/v5.1/7.7.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.7.adoc rename to EN/modules/ROOT/pages/v5.1/7.7.adoc diff --git a/EN/modules/ROOT/pages/master/7.8.adoc b/EN/modules/ROOT/pages/v5.1/7.8.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.8.adoc rename to EN/modules/ROOT/pages/v5.1/7.8.adoc diff --git a/EN/modules/ROOT/pages/master/7.9.adoc b/EN/modules/ROOT/pages/v5.1/7.9.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/7.9.adoc rename to EN/modules/ROOT/pages/v5.1/7.9.adoc diff --git a/EN/modules/ROOT/pages/master/8.adoc b/EN/modules/ROOT/pages/v5.1/8.adoc similarity index 98% rename from EN/modules/ROOT/pages/master/8.adoc rename to EN/modules/ROOT/pages/v5.1/8.adoc index 357d6ccd..2682744f 100644 --- a/EN/modules/ROOT/pages/master/8.adoc +++ b/EN/modules/ROOT/pages/v5.1/8.adoc @@ -29,7 +29,7 @@ Our team is a continuously open team, focusing on parts of IvorySQL. In our team == **Contributor's Guide** -Before contributing, we need to know the current version of IvorySQL and the version of the document.At present, we maintain versions after version *5.0*. Our version follows the update pace of PG. Please update to the latest version before contributing. After that, we need to read the format requirements carefully and be familiar with code format, code comment format, issue format, pull PR title format, document contribution format, and article contribution format. These can help you become a contributor of IvorySQL as soon as possible. +Before contributing, we need to know the current version of IvorySQL and the version of the document.At present, we maintain versions after version *{ivorysql-version}*. Our version follows the update pace of PG. Please update to the latest version before contributing. After that, we need to read the format requirements carefully and be familiar with code format, code comment format, issue format, pull PR title format, document contribution format, and article contribution format. These can help you become a contributor of IvorySQL as soon as possible. === Preparation before Contribution @@ -90,7 +90,11 @@ For C and Perl code, please run pgindent if necessary. We recommend using git di All new functionality that is contributed to IvorySQL should be covered by regression tests that are contributed alongside it. If you are uncertain about how to test or document your work, please raise the question on the ivorysql-hackers mailing list and the developer community will do its best to help you. -At the very minimum, you should always be running make installcheck-world to make sure that you're not breaking anything. +At the very minimum, you should always be running +``` +make installcheck world +``` +to make sure that you're not breaking anything. ==== Changes applicable to upstream PostgreSQL diff --git a/EN/modules/ROOT/pages/master/9.adoc b/EN/modules/ROOT/pages/v5.1/9.adoc similarity index 90% rename from EN/modules/ROOT/pages/master/9.adoc rename to EN/modules/ROOT/pages/v5.1/9.adoc index 43b2b6e9..d4b420c6 100644 --- a/EN/modules/ROOT/pages/master/9.adoc +++ b/EN/modules/ROOT/pages/v5.1/9.adoc @@ -13,40 +13,40 @@ When specified on the command line, user and database names have their case pres |=== | category | Tool name | Description -| Client Applications | clusterdb | clusterdb is a utility for reclustering tables in a IvorySQL database. It finds tables that have previously been clustered, and clusters them again on the same index that was last used. Tables that have never been clustered are not affected.clusterdb is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-cluster.html[CLUSTER]. There is no effective difference between clustering databases via this utility and via other methods for accessing the server. -| | createdb | createdb creates a new IvorySQL database.Normally, the database user who executes this command becomes the owner of the new database. However, a different owner can be specified via the -O option, if the executing user has appropriate privileges.createdb is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-createdatabase.html[`CREATE DATABASE`]. There is no effective difference between creating databases via this utility and via other methods for accessing the server. -| | createuser | createuser creates a new IvorySQL user (or more precisely, a role). Only superusers and users with `CREATEROLE` privilege can create new users, so createuser must be invoked by someone who can connect as a superuser or a user with `CREATEROLE` privilege. createuser is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-createrole.html[`CREATE ROLE`]. There is no effective difference between creating users via this utility and via other methods for accessing the server. -| | dropdb | dropdb destroys an existing IvorySQL database. The user who executes this command must be a database superuser or the owner of the database.dropdb is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-dropdatabase.html[`DROP DATABASE`]. There is no effective difference between dropping databases via this utility and via other methods for accessing the server. -| | dropuser | dropuser removes an existing IvorySQL user. Only superusers and users with the `CREATEROLE` privilege can remove IvorySQL users. (To remove a superuser, you must yourself be a superuser.)dropuser is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-droprole.html[`DROP ROLE`]. There is no effective difference between dropping users via this utility and via other methods for accessing the server. -| | ecpg | `ecpg` is the embedded SQL preprocessor for C programs. It converts C programs with embedded SQL statements to normal C code by replacing the SQL invocations with special function calls. The output files can then be processed with any C compiler tool chain.`ecpg` will convert each input file given on the command line to the corresponding C output file. If an input file name does not have any extension, `.pgc` is assumed. The file's extension will be replaced by `.c` to construct the output file name. But the output file name can be overridden using the `-o` option.If an input file name is just `-`, `ecpg` reads the program from standard input (and writes to standard output, unless that is overridden with `-o`).This reference page does not describe the embedded SQL language. -| | pg_amcheck | pg_amcheck supports running http://www.postgresql.org/docs/17/amcheck.html[amcheck]'s corruption checking functions against one or more databases, with options to select which schemas, tables and indexes to check, which kinds of checking to perform, and whether to perform the checks in parallel, and if so, the number of parallel connections to establish and use. -| | pg_basebackup | pg_basebackup is used to take a base backup of a running IvorySQL database cluster. The backup is taken without affecting other clients of the database, and can be used both for point-in-time recovery and as the starting point for a log-shipping or streaming-replication standby server.pg_basebackup makes an exact copy of the database cluster's files, while making sure the server is put into and out of backup mode automatically. Backups are always taken of the entire database cluster; it is not possible to back up individual databases or database objects. For selective backups, another tool such as http://www.postgresql.org/docs/17/app-pgdump.html[pg_dump] must be used.The backup is made over a regular IvorySQL connection that uses the replication protocol. The connection must be made with a user ID that has `REPLICATION` permissions or is a superuser, and http://www.postgresql.org/docs/17/auth-pg-hba-conf.html[`pg_hba.conf`] must permit the replication connection. The server must also be configured with http://www.postgresql.org/docs/17/runtime-config-replication.html#GUC-MAX-WAL-SENDERS[max_wal_senders] set high enough to provide at least one walsender for the backup plus one for WAL streaming (if used).There can be multiple `pg_basebackup`s running at the same time, but it is usually better from a performance point of view to take only one backup, and copy the result.pg_basebackup can make a base backup from not only a primary server but also a standby. To take a backup from a standby, set up the standby so that it can accept replication connections (that is, set `max_wal_senders` and http://www.postgresql.org/docs/17/runtime-config-replication.html#GUC-HOT-STANDBY[hot_standby], and configure its `pg_hba.conf` appropriately). You will also need to enable http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-FULL-PAGE-WRITES[full_page_writes] on the primary. -| | pgbench | pgbench is a simple program for running benchmark tests on IvorySQL. It runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second). By default, pgbench tests a scenario that is loosely based on TPC-B, involving five `SELECT`, `UPDATE`, and `INSERT` commands per transaction. However, it is easy to test other cases by writing your own transaction script files. -| | pg_config | The pg_config utility prints configuration parameters of the currently installed version of IvorySQL. It is intended, for example, to be used by software packages that want to interface to IvorySQL to facilitate finding the required header files and libraries. -| | pg_dump | pg_dump is a utility for backing up a IvorySQL database. It makes consistent backups even if the database is being used concurrently. pg_dump does not block other users accessing the database (readers or writers).pg_dump only dumps a single database. To back up an entire cluster, or to back up global objects that are common to all databases in a cluster (such as roles and tablespaces), use http://www.postgresql.org/docs/17/app-pg-dumpall.html[pg_dumpall]. Dumps can be output in script or archive file formats. Script dumps are plain-text files containing the SQL commands required to reconstruct the database to the state it was in at the time it was saved. To restore from such a script, feed it to http://www.postgresql.org/docs/17/app-psql.html[psql]. Script files can be used to reconstruct the database even on other machines and other architectures; with some modifications, even on other SQL database products.The alternative archive file formats must be used with http://www.postgresql.org/docs/17/app-pgrestore.html[pg_restore] to rebuild the database. They allow pg_restore to be selective about what is restored, or even to reorder the items prior to being restored. The archive file formats are designed to be portable across architectures.When used with one of the archive file formats and combined with pg_restore, pg_dump provides a flexible archival and transfer mechanism. pg_dump can be used to backup an entire database, then pg_restore can be used to examine the archive and/or select which parts of the database are to be restored. The most flexible output file formats are the “custom” format ( `-Fc` ) and the “directory” format ( `-Fd` ). They allow for selection and reordering of all archived items, support parallel restoration, and are compressed by default. The “directory” format is the only format that supports parallel dumps.While running pg_dump, one should examine the output for any warnings (printed on standard error), especially in light of the limitations listed below. -| | pg_dumpall | pg_dumpall is a utility for writing out (“dumping”) all IvorySQL databases of a cluster into one script file. The script file contains SQL commands that can be used as input to http://www.postgresql.org/docs/17/app-psql.html[psql] to restore the databases. It does this by calling http://www.postgresql.org/docs/17/app-pgdump.html[pg_dump] for each database in the cluster. pg_dumpall also dumps global objects that are common to all databases, namely database roles, tablespaces, and privilege grants for configuration parameters. (pg_dump does not save these objects.)Since pg_dumpall reads tables from all databases you will most likely have to connect as a database superuser in order to produce a complete dump. Also you will need superuser privileges to execute the saved script in order to be allowed to add roles and create databases.The SQL script will be written to the standard output. Use the `-f`/`--file` option or shell operators to redirect it into a file.pg_dumpall needs to connect several times to the IvorySQL server (once per database). If you use password authentication it will ask for a password each time. It is convenient to have a `~/.pgpass` file in such cases. -| | pg_isready | pg_isready is a utility for checking the connection status of a IvorySQL database server. The exit status specifies the result of the connection check. -| | pg_receivewal | pg_receivewal is used to stream the write-ahead log from a running IvorySQL cluster. The write-ahead log is streamed using the streaming replication protocol, and is written to a local directory of files. This directory can be used as the archive location for doing a restore using point-in-time recovery.pg_receivewal streams the write-ahead log in real time as it's being generated on the server, and does not wait for segments to complete like http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-ARCHIVE-COMMAND[archive_command] does. For this reason, it is not necessary to set http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-ARCHIVE-TIMEOUT[archive_timeout] when using pg_receivewal.Unlike the WAL receiver of a IvorySQL standby server, pg_receivewal by default flushes WAL data only when a WAL file is closed. The option `--synchronous` must be specified to flush WAL data in real time. Since pg_receivewal does not apply WAL, you should not allow it to become a synchronous standby when http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT[synchronous_commit] equals `remote_apply`. If it does, it will appear to be a standby that never catches up, and will cause transaction commits to block. To avoid this, you should either configure an appropriate value for http://www.postgresql.org/docs/17/runtime-config-replication.html#GUC-SYNCHRONOUS-STANDBY-NAMES[synchronous_standby_names], or specify `application_name` for pg_receivewal that does not match it, or change the value of `synchronous_commit` to something other than `remote_apply`.The write-ahead log is streamed over a regular IvorySQL connection and uses the replication protocol. The connection must be made with a user having `REPLICATION` permissions or a superuser, and `pg_hba.conf` must permit the replication connection. The server must also be configured with http://www.postgresql.org/docs/17/runtime-config-replication.html#GUC-MAX-WAL-SENDERS[max_wal_senders] set high enough to leave at least one session available for the stream. -| | pg_recvlogical | `pg_recvlogical` controls logical decoding replication slots and streams data from such replication slots.It creates a replication-mode connection, so it is subject to the same constraints as http://www.postgresql.org/docs/17/app-pgreceivewal.html[pg_receivewal], plus those for logical replication .`pg_recvlogical` has no equivalent to the logical decoding SQL interface's peek and get modes. It sends replay confirmations for data lazily as it receives it and on clean exit. To examine pending data on a slot without consuming it, use http://www.postgresql.org/docs/17/functions-admin.html#FUNCTIONS-REPLICATION[`pg_logical_slot_peek_changes`]. -| | pg_restore | pg_restore is a utility for restoring a IvorySQL database from an archive created by http://www.postgresql.org/docs/17/app-pgdump.html[pg_dump] in one of the non-plain-text formats. It will issue the commands necessary to reconstruct the database to the state it was in at the time it was saved. The archive files also allow pg_restore to be selective about what is restored, or even to reorder the items prior to being restored. The archive files are designed to be portable across architectures.pg_restore can operate in two modes. If a database name is specified, pg_restore connects to that database and restores archive contents directly into the database. Otherwise, a script containing the SQL commands necessary to rebuild the database is created and written to a file or standard output. This script output is equivalent to the plain text output format of pg_dump. Some of the options controlling the output are therefore analogous to pg_dump options.Obviously, pg_restore cannot restore information that is not present in the archive file. For instance, if the archive was made using the “dump data as `INSERT` commands” option, pg_restore will not be able to load the data using `COPY` statements. -| | pg_verifybackup | pg_verifybackup is used to check the integrity of a database cluster backup taken using `pg_basebackup` against a `backup_manifest` generated by the server at the time of the backup. The backup must be stored in the "plain" format; a "tar" format backup can be checked after extracting it.It is important to note that the validation which is performed by pg_verifybackup does not and cannot include every check which will be performed by a running server when attempting to make use of the backup. Even if you use this tool, you should still perform test restores and verify that the resulting databases work as expected and that they appear to contain the correct data. However, pg_verifybackup can detect many problems that commonly occur due to storage problems or user error.Backup verification proceeds in four stages. First, `pg_verifybackup` reads the `backup_manifest` file. If that file does not exist, cannot be read, is malformed, or fails verification against its own internal checksum, `pg_verifybackup` will terminate with a fatal error. -| | psql | psql is a terminal-based front-end to IvorySQL. It enables you to type in queries interactively, issue them to IvorySQL, and see the query results. Alternatively, input can be from a file or from command line arguments. In addition, psql provides a number of meta-commands and various shell-like features to facilitate writing scripts and automating a wide variety of tasks. -| | reindexdb | reindexdb is a utility for rebuilding indexes in a IvorySQL database.reindexdb is a wrapper around the SQL command http://www.postgresql.org/docs/17/sql-reindex.html[`REINDEX`]. There is no effective difference between reindexing databases via this utility and via other methods for accessing the server. -| | vacuumdb | vacuumdb is a utility for cleaning a IvorySQL database. vacuumdb will also generate internal statistics used by the IvorySQL query optimizer. -| Server Applications | initdb(1) | `initdb` creates a new IvorySQL database cluster. A database cluster is a collection of databases that are managed by a single server instance.Creating a database cluster consists of creating the directories in which the database data will live, generating the shared catalog tables (tables that belong to the whole cluster rather than to any particular database), and creating the `postgres`, `template1`, and `template0` databases. The `postgres` database is a default database meant for use by users, utilities and third party applications. `template1` and `template0` are meant as source databases to be copied by later `CREATE DATABASE` commands. `template0` should never be modified, but you can add objects to `template1`, which by default will be copied into databases created later.Although `initdb` will attempt to create the specified data directory, it might not have permission if the parent directory of the desired data directory is root-owned. To initialize in such a setup, create an empty data directory as root, then use `chown` to assign ownership of that directory to the database user account, then `su` to become the database user to run `initdb`. -| Server Applications | initdb(2) | `initdb` must be run as the user that will own the server process, because the server needs to have access to the files and directories that `initdb` creates. Since the server cannot be run as root, you must not run `initdb` as root either. (It will in fact refuse to do so.)For security reasons the new cluster created by `initdb` will only be accessible by the cluster owner by default. The `--allow-group-access` option allows any user in the same group as the cluster owner to read files in the cluster. This is useful for performing backups as a non-privileged user.`initdb` initializes the database cluster's default locale and character set encoding. These can also be set separately for each database when it is created. `initdb` determines those settings for the template databases, which will serve as the default for all other databases. By default, `initdb` uses the locale provider `libc`, takes the locale settings from the environment, and determines the encoding from the locale settings. This is almost always sufficient, unless there are special requirements.To choose a different locale for the cluster, use the option `--locale`. There are also individual options `--lc-*` (see below) to set values for the individual locale categories. Note that inconsistent settings for different locale categories can give nonsensical results, so this should be used with care.Alternatively, the ICU library can be used to provide locale services. (Again, this only sets the default for subsequently created databases.) To select this option, specify `--locale-provider=icu`. To choose the specific ICU locale ID to apply, use the option `--icu-locale`. Note that for implementation reasons and to support legacy code, `initdb` will still select and initialize libc locale settings when the ICU locale provider is used.When `initdb` runs, it will print out the locale settings it has chosen. If you have complex requirements or specified multiple options, it is advisable to check that the result matches what was intended. -| | pg_archivecleanup | pg_archivecleanup is designed to be used as an `archive_cleanup_command` to clean up WAL file archives when running as a standby server .pg_archivecleanup can also be used as a standalone program to clean WAL file archives. -| | pg_checksums | pg_checksums checks, enables or disables data checksums in a IvorySQL cluster. The server must be shut down cleanly before running pg_checksums. When verifying checksums, the exit status is zero if there are no checksum errors, and nonzero if at least one checksum failure is detected. When enabling or disabling checksums, the exit status is nonzero if the operation failed.When verifying checksums, every file in the cluster is scanned. When enabling checksums, each relation file block with a changed checksum is rewritten in-place. Disabling checksums only updates the file `pg_control`. -| | pg_controldata | `pg_controldata` prints information initialized during `initdb`, such as the catalog version. It also shows information about write-ahead logging and checkpoint processing. This information is cluster-wide, and not specific to any one database.This utility can only be run by the user who initialized the cluster because it requires read access to the data directory. You can specify the data directory on the command line, or use the environment variable `PGDATA`. This utility supports the options `-V` and `--version`, which print the pg_controldata version and exit. It also supports options `-?` and `--help`, which output the supported arguments. -| | pg_ctl | pg_ctl is a utility for initializing a IvorySQL database cluster, starting, stopping, or restarting the IvorySQL database server (http://www.postgresql.org/docs/17/app-postgres.html[postgres]), or displaying the status of a running server. Although the server can be started manually, pg_ctl encapsulates tasks such as redirecting log output and properly detaching from the terminal and process group. It also provides convenient options for controlled shutdown. -| | pg_resetwal | `pg_resetwal` clears the write-ahead log (WAL) and optionally resets some other control information stored in the `pg_control` file. This function is sometimes needed if these files have become corrupted. It should be used only as a last resort, when the server will not start due to such corruption.After running this command, it should be possible to start the server, but bear in mind that the database might contain inconsistent data due to partially-committed transactions. You should immediately dump your data, run `initdb`, and restore. After restore, check for inconsistencies and repair as needed.This utility can only be run by the user who installed the server, because it requires read/write access to the data directory. For safety reasons, you must specify the data directory on the command line. `pg_resetwal` does not use the environment variable `PGDATA`.If `pg_resetwal` complains that it cannot determine valid data for `pg_control`, you can force it to proceed anyway by specifying the `-f` (force) option. In this case plausible values will be substituted for the missing data. Most of the fields can be expected to match, but manual assistance might be needed for the next OID, next transaction ID and epoch, next multitransaction ID and offset, and WAL starting location fields. These fields can be set using the options discussed below. If you are not able to determine correct values for all these fields, `-f` can still be used, but the recovered database must be treated with even more suspicion than usual: an immediate dump and restore is imperative. *Do not* execute any data-modifying operations in the database before you dump, as any such action is likely to make the corruption worse. -| | pg_rewind(1) | pg_rewind is a tool for synchronizing a IvorySQL cluster with another copy of the same cluster, after the clusters' timelines have diverged. A typical scenario is to bring an old primary server back online after failover as a standby that follows the new primary.After a successful rewind, the state of the target data directory is analogous to a base backup of the source data directory. Unlike taking a new base backup or using a tool like rsync, pg_rewind does not require comparing or copying unchanged relation blocks in the cluster. Only changed blocks from existing relation files are copied; all other files, including new relation files, configuration files, and WAL segments, are copied in full. As such the rewind operation is significantly faster than other approaches when the database is large and only a small fraction of blocks differ between the clusters.pg_rewind examines the timeline histories of the source and target clusters to determine the point where they diverged, and expects to find WAL in the target cluster's `pg_wal` directory reaching all the way back to the point of divergence. The point of divergence can be found either on the target timeline, the source timeline, or their common ancestor. In the typical failover scenario where the target cluster was shut down soon after the divergence, this is not a problem, but if the target cluster ran for a long time after the divergence, its old WAL files might no longer be present. In this case, you can manually copy them from the WAL archive to the `pg_wal` directory, or run pg_rewind with the `-c` option to automatically retrieve them from the WAL archive. The use of pg_rewind is not limited to failover, e.g., a standby server can be promoted, run some write transactions, and then rewound to become a standby again.After running pg_rewind, WAL replay needs to complete for the data directory to be in a consistent state. -| | pg_rewind(2) | When the target server is started again it will enter archive recovery and replay all WAL generated in the source server from the last checkpoint before the point of divergence. If some of the WAL was no longer available in the source server when pg_rewind was run, and therefore could not be copied by the pg_rewind session, it must be made available when the target server is started. This can be done by creating a `recovery.signal` file in the target data directory and by configuring a suitable http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-RESTORE-COMMAND[restore_command] in `IvorySQL.conf`.pg_rewind requires that the target server either has the http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-WAL-LOG-HINTS[wal_log_hints] option enabled in `IvorySQL.conf` or data checksums enabled when the cluster was initialized with initdb. Neither of these are currently on by default. http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-FULL-PAGE-WRITES[full_page_writes] must also be set to `on`, but is enabled by default. -| | pg_test_fsync | pg_test_fsync is intended to give you a reasonable idea of what the fastest http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-WAL-SYNC-METHOD[wal_sync_method] is on your specific system, as well as supplying diagnostic information in the event of an identified I/O problem. However, differences shown by pg_test_fsync might not make any significant difference in real database throughput, especially since many database servers are not speed-limited by their write-ahead logs. pg_test_fsync reports average file sync operation time in microseconds for each `wal_sync_method`, which can also be used to inform efforts to optimize the value of http://www.postgresql.org/docs/17/runtime-config-wal.html#GUC-COMMIT-DELAY[commit_delay]. -| | pg_test_timing | pg_test_timing is a tool to measure the timing overhead on your system and confirm that the system time never moves backwards. Systems that are slow to collect timing data can give less accurate `EXPLAIN ANALYZE` results. -| | pg_upgrade | Major IvorySQL releases regularly add new features that often change the layout of the system tables, but the internal data storage format rarely changes. pg_upgrade uses this fact to perform rapid upgrades by creating new system tables and simply reusing the old user data files. If a future major release ever changes the data storage format in a way that makes the old data format unreadable, pg_upgrade will not be usable for such upgrades. (The community will attempt to avoid such situations.)pg_upgrade does its best to make sure the old and new clusters are binary-compatible, e.g., by checking for compatible compile-time settings, including 32/64-bit binaries. It is important that any external modules are also binary compatible, though this cannot be checked by pg_upgrade. -| | pg_waldump | `pg_waldump` displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes.This utility can only be run by the user who installed the server, because it requires read-only access to the data directory. -| | postgres | `postgres` is the IvorySQL database server. In order for a client application to access a database it connects (over a network or locally) to a running `postgres` instance. The `postgres` instance then starts a separate server process to handle the connection. +| Client Applications | clusterdb | Reclusters the tables that were previously marked as clustered, acting as a wrapper around the SQL http://www.postgresql.org/docs/17/sql-cluster.html[CLUSTER] command. +| | createdb | Creates a new IvorySQL database, optionally specifying owner, encoding, locale or tablespace, just like running http://www.postgresql.org/docs/17/sql-createdatabase.html[`CREATE DATABASE`]. +| | createuser | Creates a new IvorySQL role when run by a superuser or someone with `CREATEROLE`, mirroring http://www.postgresql.org/docs/17/sql-createrole.html[`CREATE ROLE`]. +| | dropdb | Removes an existing database when run by its owner or a superuser, wrapping http://www.postgresql.org/docs/17/sql-dropdatabase.html[`DROP DATABASE`]. +| | dropuser | Deletes an existing role and corresponds to http://www.postgresql.org/docs/17/sql-droprole.html[`DROP ROLE`]; superuser or `CREATEROLE` privileges are required. +| | ecpg | Preprocesses C source files that embed SQL, turning statements into libpq calls so the code can then be compiled with a normal toolchain. +| | pg_amcheck | Runs http://www.postgresql.org/docs/17/amcheck.html[amcheck] routines to validate indexes and heap data, allowing filtered and parallel corruption checks. +| | pg_basebackup | Takes an online base backup over the replication protocol for PITR or standby seeding, copying the entire cluster while managing backup mode automatically. +| | pgbench | Executes customizable benchmark scripts (TPC-B style by default) to measure throughput, concurrency and latency of an IvorySQL instance. +| | pg_config | Prints build-time configuration details (include paths, library directories, version, etc.) for the currently installed IvorySQL binaries. +| | pg_dump | Creates a consistent backup of a single database in plain SQL or archive formats that can later be restored with http://www.postgresql.org/docs/17/app-pgrestore.html[pg_restore]. +| | pg_dumpall | Sequentially dumps every database plus global objects into one SQL script by invoking pg_dump per database. +| | pg_isready | Returns the connection status of a target server so scripts can detect whether IvorySQL is accepting connections. +| | pg_receivewal | Streams WAL segments from a running cluster via the replication protocol and writes them to disk for archiving or downstream recovery. +| | pg_recvlogical | Manages logical-replication slots and streams decoded changes over a replication connection for custom consumers. +| | pg_restore | Replays archives produced by pg_dump (non-plain formats) directly into a database or onto stdout, supporting selective and reordered restores. +| | pg_verifybackup | Validates a plain-format backup created by `pg_basebackup` against its `backup_manifest`, detecting missing or corrupted files before restore. +| | psql | Terminal client that runs SQL interactively or from scripts, providing meta-commands, variables and scripting conveniences. +| | reindexdb | Rebuilds indexes for a database, schema or table set, invoking http://www.postgresql.org/docs/17/sql-reindex.html[`REINDEX`] under the hood. +| | vacuumdb | Automates `VACUUM` (optionally `ANALYZE`) for selected databases or tables to reclaim space and refresh optimizer statistics. +| Server Applications | initdb(1) | Initializes a new database cluster by creating the data directory, catalog tables and default databases (`postgres`, `template1`, `template0`). +| Server Applications | initdb(2) | Must be run as the future cluster owner; controls file permissions plus the default locale, encoding and ICU/libc settings for the cluster. +| | pg_archivecleanup | Cleans archived WAL files, typically via `archive_cleanup_command`, so old segments are removed once they are no longer needed. +| | pg_checksums | Enables, disables or verifies cluster-wide data checksums while the server is stopped, rewriting blocks as needed. +| | pg_controldata | Displays cluster control information (catalog version, checkpoint and WAL status) by reading `pg_control`. +| | pg_ctl | Initializes, starts, stops, restarts or queries the status of the IvorySQL server, handling log redirection and daemonization. +| | pg_resetwal | Resets the WAL and selected control fields after corruption so the server can start, to be followed by a dump and rebuild. +| | pg_rewind(1) | Syncs a diverged cluster with another timeline by copying only the changed blocks since the split, enabling quick re-attachment as a standby. +| | pg_rewind(2) | Requires retained WAL or archive access plus `wal_log_hints` or checksums; after rewinding, recovery replays new WAL before the node can serve. +| | pg_test_fsync | Benchmarks different `wal_sync_method` options to identify the fastest durable fsync strategy on the host OS and storage. +| | pg_test_timing | Measures timer resolution and detects backward time jumps, helping interpret `EXPLAIN ANALYZE` accuracy. +| | pg_upgrade | Reuses existing data files to move between major releases quickly, checking binary compatibility and external module support. +| | pg_waldump | Reads and prints WAL records for debugging or education; requires direct read access to the data directory. +| | postgres | The actual IvorySQL server executable that accepts client connections and forks per-session backend processes. |=== == Client Applications diff --git a/EN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc b/EN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc new file mode 100644 index 00000000..a4313eef --- /dev/null +++ b/EN/modules/ROOT/pages/v5.1/cpu_arch_adp.adoc @@ -0,0 +1,15 @@ + +:sectnums: +:sectnumlevels: 5 + += **CPU Architecture Adaption** + +IvorySQL adapts the following CPU architectures: +[cols="8h,~,~,~"] +|==== +| Index | Architecture Name | Adapt to brands | Multi-platform Media Packages +| 1 | x86_64 | Intel, AMD, ZHAOXIN, HYGON | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-x86_64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-x86_64-rpm}[rpm] +| 2 | aarch64 | Phytium, Kunpeng | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-aarch64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-aarch64-rpm}[rpm] +| 3 | mips64el| Loongson3000, Loongson4000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-mips64el-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-mips64el-rpm}[rpm] +| 4 | loongarch64 | Loongson5000 | https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-loongarch64-deb}[deb], https://github.com/IvorySQL/IvorySQL/releases/download/IvorySQL_{ivorysql-version}/{package-link-loongarch64-rpm}[rpm] +|==== \ No newline at end of file diff --git a/EN/modules/ROOT/pages/master/os_arch_adp.adoc b/EN/modules/ROOT/pages/v5.1/os_arch_adp.adoc similarity index 100% rename from EN/modules/ROOT/pages/master/os_arch_adp.adoc rename to EN/modules/ROOT/pages/v5.1/os_arch_adp.adoc diff --git a/EN/modules/ROOT/pages/master/welcome.adoc b/EN/modules/ROOT/pages/v5.1/welcome.adoc similarity index 82% rename from EN/modules/ROOT/pages/master/welcome.adoc rename to EN/modules/ROOT/pages/v5.1/welcome.adoc index 1e5c9e96..84b7bed8 100644 --- a/EN/modules/ROOT/pages/master/welcome.adoc +++ b/EN/modules/ROOT/pages/v5.1/welcome.adoc @@ -15,4 +15,4 @@ IvorySQL project is an open source project proposed by Highgo Software to add th It is Apache licensed Open Source and always free to use. Any comments please contact support@ivorysql.org == Docs Download -https://docs.ivorysql.org/en/ivorysql-doc/v5.0/ivorysql.pdf[IvorySQL v5.0 pdf documentation] +https://docs.ivorysql.org/en/ivorysql-doc/v{ivorysql-version}/ivorysql.pdf[IvorySQL v{ivorysql-version} pdf documentation]