diff --git a/docBuilder/Makefile b/docBuilder/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d0c3cbf1020d5c292abdedf27627c6abe25e2293 --- /dev/null +++ b/docBuilder/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docBuilder/README.md b/docBuilder/README.md new file mode 100644 index 0000000000000000000000000000000000000000..13369e51c6d1ada7f7251efd81571bc6c807bfdb --- /dev/null +++ b/docBuilder/README.md @@ -0,0 +1,112 @@ +# 简介 + +本工具基于sphinx,用于将openGuass的文档转换成html,pdf格式。 + +# 环境 + +Windows,ubuntu 18.04,python3 + +# 安装 + +安装sphinx + +``` +pip install sphinx +``` + +安装myst_parser + +``` +pip install myst-parser +``` +# 生成文档 + +## 目录结构 + +``` +- README.md +- source + - _static + - _templates + - Appendix + - content + - index.rst + - conf.py +- html2pdf +``` + +### 配置文档 +markdown文档位于content文件夹,index.rst为入口文件 + +index.rst +```rst +Welcome to openGauss's documentation! +===================================== + +.. toctree:: + Appendix/Appendix +``` + +Appendix/Appendix.rst: +```rst + +.. toctree:: + + 常见问题解答FAQ + 错误日志信息参考 + ../content/zh/docs/Appendix/术语表 +``` + +`toctree`下配置文档的路径,可根据实际需求修改 +## 生成html +``` +./make html +``` +文档生成在build/html + +## 生成pdf + +### windows: + +安装texlive2022 +- [教程](https://zhuanlan.zhihu.com/p/493412905) + +生成pdf +``` +./make latexpdf +``` +### ubuntu 18.04 + +安装生成pdf需要的latex的组件 +``` +sudo apt-get install texmaker gummi texlive texlive-full texlive-latex-recommended latexdraw intltool-debian lacheck libgtksourceview2.0-0 libgtksourceview2.0-common lmodern luatex po-debconf tex-common texlive-binaries texlive-extra-utils texlive-latex-base texlive-latex-base-doc texlive-luatex texlive-xetex texlive-lang-cyrillic texlive-fonts-extra texlive-science texlive-latex-extra texlive-pstricks +``` +生成pdf +``` +make latexpdf +``` + +文档生成在build/latex + + +# html2pdf + +本工具用于将sphinx生成的html转换成pdf + +## 配置环境 + +wkhtmltopdf 0.12.6 + +安装[wkhtmltopdf](https://wkhtmltopdf.org/) + +### 加载sphinx生成的html +``` +python loadHtml.py +``` +### 生成pdf +``` +python generatePdf.py +``` + +生成的pdf文件在output.pdf + diff --git a/docBuilder/html2pdf/generatePdf.py b/docBuilder/html2pdf/generatePdf.py new file mode 100644 index 0000000000000000000000000000000000000000..d5a97c86ee07915644b9d5e339582b9f73a0a024 --- /dev/null +++ b/docBuilder/html2pdf/generatePdf.py @@ -0,0 +1,25 @@ +import subprocess +import os +path = 'index.html' +def convert_html_to_pdf(html_file, output_pdf, additional_args=None): + command = ['wkhtmltopdf'] + if additional_args: + command.extend(additional_args) + command.extend([html_file, output_pdf]) + subprocess.run(command) + +# 测试 +html_file = 'index.html' +output_pdf = 'output.pdf' +additional_args = ['--page-size', 'A4','--user-style-sheet','../source/_static/my_theme.css','--footer-right','2023, openGauss','--footer-center','[page]','--footer-font-size','8','--footer-font-name','Aria','toc','--toc-header-text','目录'] +if os.path.exists(path): + convert_html_to_pdf(html_file, output_pdf, additional_args) + print("转换完成") +else: + print("请先运行 python loadHtml.py") + + +# 开发情况下取消注释 + +if os.path.exists(path): + os.remove(path) diff --git a/docBuilder/html2pdf/loadHtml.py b/docBuilder/html2pdf/loadHtml.py new file mode 100644 index 0000000000000000000000000000000000000000..eda9d11b81efce387089b43a98ab0946829cea12 --- /dev/null +++ b/docBuilder/html2pdf/loadHtml.py @@ -0,0 +1,263 @@ +import os +import re +import base64 +from bs4 import BeautifulSoup +import urllib.parse +def strip_chars(html): + return html.replace('¶', '') + +def remove_h3_tags(html_content): + pattern = r'

导航<\/h3>' + return re.sub(pattern, '', html_content) + +def strip_current_ul(html): + soup = BeautifulSoup(html, 'html.parser') + ul_tags = soup.find_all('ul', class_='current') + for ul_tag in ul_tags: + ul_tag.decompose() + modified_html = str(soup) + return modified_html + + +def remove_relations_div_tags(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + div_tags = soup.find_all('div', class_='relations') + for div_tag in div_tags: + div_tag.decompose() + + modified_html = str(soup) + return modified_html + + +def remove_toctree_li_tags(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + + div_tags = soup.find_all('li', class_='toctree-l1') + for div_tag in div_tags: + div_tag.decompose() + + modified_html = str(soup) + return modified_html + + +def remove_footer_div_tags(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + div_tags = soup.find_all('div', class_='footer') + for div_tag in div_tags: + div_tag.decompose() + + modified_html = str(soup) + return modified_html + +def remove_sphinxsidebar_div_tags(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + div_tags = soup.find_all('div', class_='sphinxsidebar') + for div_tag in div_tags: + div_tag.decompose() + + modified_html = str(soup) + return modified_html + +def remove_logo_h1_tags(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + div_tags = soup.find_all('h1', class_='logo') + for div_tag in div_tags: + div_tag.decompose() + + modified_html = str(soup) + return modified_html + +def modify_section_id(html_content): + soup = BeautifulSoup(html_content, 'html.parser') + h1_tag = soup.find('h1') + if h1_tag: + section_tags = soup.find_all('section', class_='tex2jax_ignore mathjax_ignore') + for section_tag in section_tags: + section_tag['id'] = h1_tag.text.strip() + + return str(soup) + +def replace_image_data(html_body,file_path): + html_body = re.sub(r'标签 + + span_content = span_tag.get_text() # 获取标签的内容 + a_tag['href'] = '#' + span_content # 修改标签的href属性为"# + span标签内容" + + modified_html = str(a_tag) # 将BeautifulSoup对象转换为字符串 + + return modified_html + else: + return html_code + + + + +def get_image_data(image_path): + if os.path.isfile(image_path): + with open(image_path,'rb') as f: + image_data = f.read() + image_data_base64 = base64.b64encode(image_data).decode('utf-8') + return 'data:image/png;base64,' + image_data_base64 + else: + return image_path + +def append_html_files(folder_path, html_file_path): + judgepath(html_file_path) + + html_files = [] + for root, dirs, files in os.walk(folder_path+'/content'): + for file in files: + if file.endswith('.html'): + file_path = os.path.join(root, file) + html_files.append(file_path) + print(html_files) + with open(html_file_path, 'a',encoding='utf-8') as html_file: + for file_path in html_files: + with open(file_path, 'r',encoding='utf-8') as file: + html_content = file.read() + html_content =strip_chars(html_content) + html_content =replace_image_data(html_content,file_path) + html_content =strip_current_ul(html_content) + html_content =remove_relations_div_tags(html_content) + html_content =remove_footer_div_tags(html_content) + html_content =remove_sphinxsidebar_div_tags(html_content) + html_content =remove_logo_h1_tags(html_content) + html_content =remove_h3_tags(html_content) + html_content =modify_section_id(html_content) + html_content =modify_section_id_1(html_content) + html_content =remove_toctree_li_tags(html_content) + html_content =modify_a_href(html_content) + html_file.write(html_content) + html_file.write('\n') + + print(f"All HTML files from '{folder_path}' and its subfolders have been appended to '{html_file_path}'.") + + + +def process_index_html(folder_path,path): + judgepath(path) + with open(folder_path+'/index.html', 'r',encoding='utf-8') as file: + html_content = file.read() + + with open(path, 'w',encoding='utf-8') as file: + html_content = strip_chars(html_content) + html_content =remove_relations_div_tags(html_content) + html_content = remove_sphinxsidebar_div_tags(html_content) + html_content = modify_li_href(html_content,'toctree-l1') + html_content = modify_section_id_to_match(html_content,'toctree-l2') + html_content = modify_section_id_to_match(html_content,'toctree-l3') + + html_content = remove_class_tags(html_content,'toctree-l') + file.write(html_content) + + + +def remove_class_tags(html, class_prefix): + + soup = BeautifulSoup(html, 'html.parser') + tags = soup.find_all(class_=lambda x: x and x.startswith(class_prefix)) + for tag in tags: + tag.decompose() + return str(soup) + + +def judgepath(path): + current_dir = os.getcwd() + + file_path = os.path.join(current_dir, path) + + if not os.path.exists(file_path): + + directory = os.path.dirname(file_path) + os.makedirs(directory, exist_ok=True) + with open(file_path, 'w') as file: + pass + + + +def modify_section_id_to_match(html, token): + soup = BeautifulSoup(html, 'html.parser') + li_tags = soup.find_all('li', class_=token) + for li_tag in li_tags: + + a_tag = li_tag.find('a', class_='reference internal') + if a_tag: + href = a_tag['href'] + text = a_tag.get_text().strip() + section_id = href.split('#')[-1] + if '#' in href: + modified_href = f'#{section_id}' + else: + modified_href = href.split('/')[-1].split('.')[0] + modified_href = f'#{urllib.parse.unquote(modified_href)}' + + a_tag['href'] = modified_href + + + return str(soup) + + + + + +def modify_li_href(html_content, class_name): + soup = BeautifulSoup(html_content, 'html.parser') + li_tags = soup.find_all('li', class_=class_name) + for li_tag in li_tags: + a_tag = li_tag.find('a') + if a_tag: + new_href = '#'+a_tag.text.strip() + a_tag['href'] = new_href + return str(soup) + + + + + + +folder_path ='../build/html' +html_file_path = 'index.html' + + +process_index_html(folder_path,html_file_path) +append_html_files(folder_path, html_file_path) \ No newline at end of file diff --git a/docBuilder/make.bat b/docBuilder/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..dc1312ab09ca6fb0267dee6b28a38e69c253631a --- /dev/null +++ b/docBuilder/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docBuilder/source/Appendix/Appendix.rst b/docBuilder/source/Appendix/Appendix.rst new file mode 100644 index 0000000000000000000000000000000000000000..5f1e0321adeac3081fcb5f18a253a08e68bece33 --- /dev/null +++ b/docBuilder/source/Appendix/Appendix.rst @@ -0,0 +1,6 @@ + +.. toctree:: + + 常见问题解答FAQ + 错误日志信息参考 + ../content/zh/docs/Appendix/术语表 \ No newline at end of file diff --git "a/docBuilder/source/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.rst" "b/docBuilder/source/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.rst" new file mode 100644 index 0000000000000000000000000000000000000000..d9932615cc78643749b2fdd096436a8b79ebdf73 --- /dev/null +++ "b/docBuilder/source/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.rst" @@ -0,0 +1,7 @@ +常见问题解答FAQ +============ +.. toctree:: + + ../content/zh/docs/Appendix/产品FAQ + ../content/zh/docs/Appendix/使用FAQ + diff --git "a/docBuilder/source/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.rst" "b/docBuilder/source/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.rst" new file mode 100644 index 0000000000000000000000000000000000000000..ca35a628fa43e6994045072b22c35f1b5b469e79 --- /dev/null +++ "b/docBuilder/source/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.rst" @@ -0,0 +1,6 @@ +错误日志信息参考 +============ +.. toctree:: + + ../content/zh/docs/Appendix/内核错误信息 + diff --git a/docBuilder/source/_static/my_theme.css b/docBuilder/source/_static/my_theme.css new file mode 100644 index 0000000000000000000000000000000000000000..fa9b89b2f7545f65edb1f667e14b5c235dbdf131 --- /dev/null +++ b/docBuilder/source/_static/my_theme.css @@ -0,0 +1,796 @@ + + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + + + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } + .blank-page { + page-break-before: always; + } +} + +@media screen{ + div.break_here { + page-break-after: always !important; + } +} + +table { + border-collapse: collapse; + border: 1px solid #aaa; + width: 100%; + page-break-inside: avoid !important; +} + +table th { + padding: 6px 6px 6px 6px; + border: 1px solid black; + text-align: left; + vertical-align: middle; + background-color: #3c3c3c; + color: #ffffff; +} + +table td { + padding: 6px 6px 6px 6px; + border: 1px solid black; + text-align: left; + vertical-align: middle; +} + +table tr:nth-child(odd) { + background-color: #ffffff; +} + +table tr:nth-child(even) { + background-color: #F5F5F5; +} + +a:link { + text-decoration: none; + color: #808080 +} + +a:visited { + text-decoration: none; + color: #808080 +} + +a:hover { + text-decoration: none; + color: #808080 +} + +a:active { + text-decoration: none; + color: #808080 +} + +pre { + overflow-x: auto; +} + +div.footer { + color: #000000; + text-align: right; + font-size: 13px; +} + +body { + margin-top: 100px; + margin-bottom: 100px; + margin-left: 10%; + margin-right: 10%; + text-align: left; +} + +thead { + display: table-row-group; +} + + +tr { + page-break-before: always; + page-break-after: always; + page-break-inside: avoid; +} + +table { + word-wrap: break-word; +} +table td { + word-break: break-all; +} \ No newline at end of file diff --git a/docBuilder/source/conf.py b/docBuilder/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..1827b599ff2393b3e22d2ce4ab8596e9073582d2 --- /dev/null +++ b/docBuilder/source/conf.py @@ -0,0 +1,111 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'openGauss' +copyright = '2023, openGauss' +author = 'openGauss' + +# The full version, including alpha/beta/rc tags +release = 'latest' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'myst_parser', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'zh_CN' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# source_parsers = { +# '.md': 'recommonmark.parser.CommonMarkParser', +# } + +from sphinx.builders.html import StandaloneHTMLBuilder + +StandaloneHTMLBuilder.supported_image_types = ['image/svg+xml', 'image/png', 'image/gif', 'image/jpeg'] +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', +} + +# latex_elements = { +# # The paper size ('letterpaper' or 'a4paper'). +# # 'papersize': 'letterpaper', + +# # The font size ('10pt', '11pt' or '12pt'). +# # 'pointsize': '10pt', + +# # Additional stuff for the LaTeX preamble. +# 'preamble': ''' +# \\hypersetup{unicode=true} +# \\usepackage{CJKutf8} +# \\AtBeginDocument{\\begin{CJK}{UTF8}{gbsn}} +# \\AtEndDocument{\\end{CJK}} +# ''', + +# # Latex figure (float) alignment +# # 'figure_align': 'htbp', +# } + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] +# html_style = '_static/my_theme.css' +master_doc= 'index' + + +# from docutils import nodes +# from sphinxcontrib.confluencebuilder.translator.storage import ConfluenceStorageFormatTranslator + +# def override_raw_hook(self, node): +# if 'html' in node.get('format', '').split(): +# node['format'] += ' confluence_storage' +# ConfluenceStorageFormatTranslator.visit_raw(self, node) +# raise nodes.SkipNode + +# def setup(app): +# app.add_node(nodes.raw, +# confluence=(override_raw_hook, None), +# override=True) \ No newline at end of file diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/EXISTS-NOT-EXISTS.png b/docBuilder/source/content/zh/docs/Appendix/figures/EXISTS-NOT-EXISTS.png new file mode 100644 index 0000000000000000000000000000000000000000..e94b8279b0646be5f2ff8961f87a3da6132200fe Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/EXISTS-NOT-EXISTS.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/IN-NOT-IN.png b/docBuilder/source/content/zh/docs/Appendix/figures/IN-NOT-IN.png new file mode 100644 index 0000000000000000000000000000000000000000..14447947244db073f027d1c9e97e3aca355d51b4 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/IN-NOT-IN.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/all.png b/docBuilder/source/content/zh/docs/Appendix/figures/all.png new file mode 100644 index 0000000000000000000000000000000000000000..e98f64309e763640273d54fdafc11c2b10a07fff Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/all.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/anonymous_block.png b/docBuilder/source/content/zh/docs/Appendix/figures/anonymous_block.png new file mode 100644 index 0000000000000000000000000000000000000000..03a1b7fce4fd91051bd03bd391add89f62bb8375 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/anonymous_block.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/any-some.png b/docBuilder/source/content/zh/docs/Appendix/figures/any-some.png new file mode 100644 index 0000000000000000000000000000000000000000..a9c566b94615d884c92cb7a6aa4212548c5446ee Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/any-some.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/case.jpg b/docBuilder/source/content/zh/docs/Appendix/figures/case.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a1c19617092c24a213aef5f0b06e7472ab9b3b42 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/case.jpg differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/coalesce.png b/docBuilder/source/content/zh/docs/Appendix/figures/coalesce.png new file mode 100644 index 0000000000000000000000000000000000000000..681174f67ca9f63a0489ee649716ef3ca84f1004 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/coalesce.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/decode.png b/docBuilder/source/content/zh/docs/Appendix/figures/decode.png new file mode 100644 index 0000000000000000000000000000000000000000..bb6cd8c0b68ec844bb4b85ad90bdc4ab9c364824 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/decode.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/greatest.png b/docBuilder/source/content/zh/docs/Appendix/figures/greatest.png new file mode 100644 index 0000000000000000000000000000000000000000..666e005ee814d926ece5b3b368148a17f85146bd Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/greatest.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/least.png b/docBuilder/source/content/zh/docs/Appendix/figures/least.png new file mode 100644 index 0000000000000000000000000000000000000000..b42a2f1f9c45e37dcbf7a2634f8d9e0404d13cc9 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/least.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/nullif.png b/docBuilder/source/content/zh/docs/Appendix/figures/nullif.png new file mode 100644 index 0000000000000000000000000000000000000000..7b0e74363d02b682efe4cc63350c7ee514f80a79 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/nullif.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/nvl.jpg b/docBuilder/source/content/zh/docs/Appendix/figures/nvl.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9c378ec205db7c788fa900344dbcc2aecb25f120 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/nvl.jpg differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001103872542.png b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001103872542.png new file mode 100644 index 0000000000000000000000000000000000000000..9047c62644435c6ef5258e05fdd6f5a73f75594e Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001103872542.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001189073180.png b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001189073180.png new file mode 100644 index 0000000000000000000000000000000000000000..4e95ea643a5f2a4b9033f65242c3d55e7e55f1ec Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001189073180.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234211585.png b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234211585.png new file mode 100644 index 0000000000000000000000000000000000000000..13a4dd9fb1a8b97996d614dc810524708c684e77 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234211585.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234864947.jpg b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234864947.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e8044368ecfd9bb5ef321d917523e8b2d53cb7fb Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001234864947.jpg differ diff --git a/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001235224851.jpg b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001235224851.jpg new file mode 100644 index 0000000000000000000000000000000000000000..50b144a7921fd344ba73d999c6184825e1418266 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/figures/zh-cn_image_0000001235224851.jpg differ diff --git "a/docBuilder/source/content/zh/docs/Appendix/openGauss\350\265\204\346\272\220\350\216\267\345\217\226.md" "b/docBuilder/source/content/zh/docs/Appendix/openGauss\350\265\204\346\272\220\350\216\267\345\217\226.md" new file mode 100644 index 0000000000000000000000000000000000000000..7466df0e64b956a1d06325701463063f1da45254 --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/openGauss\350\265\204\346\272\220\350\216\267\345\217\226.md" @@ -0,0 +1,163 @@ +# openGauss资源获取 + +openGauss提供了在线资源,其中包含大量有用的信息,例如常用的语法格式、解释以及示例。如果您在使用过程中遇到一些困难,建议您在官方网站上进行查找以解决问题。同时,您也可以通过开源社区、邮件列表等方式将您遇到的问题与openGauss的使用者们进行交流。 + +## 官网 + +[openGauss官网](https://opengauss.org/zh/)提供了openGauss软件的下载、官方文档、开源社区介绍、官方认证、知识图谱、安全以及活动等信息。 + +- 下载:提供openGauss软件包、连接工具、支持工具下载。并且附有openGauss支持工具全景图。 +- 文档 :对openGauss数据库进行了描述,包括法律声明、发行说明、关于openGauss、技术白皮书、编译指南、快速入门、安装指南、数据库管理指南、数据库运维指南、应用开发指南、数据迁移指南、性能调优指南、工具与命令参考、AI特性指南、SQL参考等内容。全方位的介绍了openGauss的架构、功能、特性以及使用方法。文档中包含大量的示例,供您参考。 +- 社区:介绍了如何对开源社区进行贡献、社区组织结构以及线上交流方式。 +- 互动:提供openGauss相关新闻、活动、视频、峰会和博客。 +- 认证:提供openGauss认证体系介绍,以及培训相关信息和证书查询入口。 +- 安全:介绍openGauss漏洞管理流程、安全公告和CVE。 +- 代码:Gitee和Github社区入口。 +- 知识:提供openGauss集群管理、数据库工具、数据库内核和数据库驱动知识图谱。 + +## openGauss开源社区 + +openGauss已经开放数据库源代码,成立了[openGauss开源社区](https://gitee.com/opengauss)。openGauss鼓励用户进行社区贡献、合作,希望能共同构建一个能够融合多元化技术架构的企业级开源数据库社区。 + +openGauss社区按照不同的SIGs(Special Interest Groups)来组织,以便于更好的管理和改善工作流程。 SIG是开放的,欢迎任何人加入并参与贡献。每一个SIG在码云上拥有一个或多个代码仓库。 您可以在SIG对应的代码仓库上提交Issue,参与Issue讨论,提交Pull Request,参与代码检视等。 常用SIG见[表1](#table9705652154412),您可以从SIG说明列表中找到您感兴趣的SIG。参与贡献的方法请参见[社区贡献](https://opengauss.org/zh/contribution/)。 + +**表 1** openGauss社区常见SIG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

SIG名称

+

职责范围

+

SQLEngine

+

负责openGauss社区SQL引擎的开发和维护。

+

StorageEngine

+

负责openGauss社区存储引擎的开发和维护。

+

Connectors

+

负责openGauss社区Connectors的开发和维护。

+

Tools

+

负责openGauss社区工具的开发和维护。

+

Docs

+

负责openGauss社区文档的开发和维护。

+

Infra

+

负责openGauss社区基础设施的开发和维护。

+

Security

+

负责openGauss社区安全的开发和维护。

+

OM

+

负责openGauss安装部署的开发和维护。

+

IoT

+

负责openGauss IoT 开发和维护。

+

In-place Update

+

负责openGauss社区in-place update引擎的开发和维护。

+

AI

+

负责openGauss社区AI的开发和维护。

+

GIS

+

负责openGauss社区地理信息系统的开发和维护。

+

CloudNative

+

负责openGauss社区云原生方向的开发和维护。

+

SecurityTechnology

+

负责openGauss社区数据库安全技术的开发和维护。

+

DistributionCertification

+

负责openGauss发行版认证流程、测试套件的定义和开发。

+

Plugin

+

负责openGauss插件机制的规划、管理、开发等。

+

Blockchain

+

探讨区块链的业务场景,研究区块链的核心技术问题。

+

DCF

+

负责openGauss社区分布式一致性框架DCF的开发和维护。

+

QA

+

负责openGauss社区版本质量相关的开发和维护。

+

Graph

+

负责openGauss社区统一存储和查询的知识图谱数据管理功能。

+
+ +## 博客 + +openGauss提供了[博客](https://opengauss.org/zh/blogs/)板块,此处汇聚了openGauss用户在使用过程中的问题解决和心得。如果遇到问题,您也可以在此处进行搜索,查看其他用户的解决办法。您在使用过程中的心得,也可以发表博客分享给其他用户,帮助更多的人解决问题。 + +## 邮件列表 + +openGauss社区使用邮件列表进行线上沟通交流。我们真诚地邀请您通过邮件列表参与讨论,详情请参见[线上交流](https://opengauss.org/zh/community/onlineCommunication/)。 + +## 学习交流平台 + +- openGauss社区 + - 微信公众号 + + ![](figures/zh-cn_image_0000001235224851.jpg) + + - [B站](https://space.bilibili.com/543286270?from=search&seid=7579369334374103192&spm_id_from=333.337.0.0) + - [CSDN](https://blog.csdn.net/weixin_49727236) + +- Gauss松鼠会技术交流圈 + - 微信公众号 + + ![](figures/zh-cn_image_0000001234864947.jpg) + + - [B站](https://space.bilibili.com/629605267?from=search&seid=8790769897413776977&spm_id_from=333.337.0.0) + - [CSDN](https://blog.csdn.net/GaussDB) + - [墨天轮](https://www.modb.pro/openGauss) + + diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-caution.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-caution.png new file mode 100644 index 0000000000000000000000000000000000000000..64225130e40623f9d66943cd01d9222145400010 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-caution.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-danger.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-danger.png new file mode 100644 index 0000000000000000000000000000000000000000..ddaf56a1d67c1a62fc17244eab421625d09b2929 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-danger.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-note.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-note.png new file mode 100644 index 0000000000000000000000000000000000000000..789e42a8a4e810f4848631a7a64a8fe521ef0fe4 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-note.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-notice.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-notice.png new file mode 100644 index 0000000000000000000000000000000000000000..21ce3f259efdaae743389e414434b864c69dd482 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-notice.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-tip.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-tip.png new file mode 100644 index 0000000000000000000000000000000000000000..88512187b1f94c2b41be2031edb52bd9220919b7 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-tip.png differ diff --git a/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-warning.png b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-warning.png new file mode 100644 index 0000000000000000000000000000000000000000..7dd8edd5ee9c3519079786ba6fd2dd4f0801a5e8 Binary files /dev/null and b/docBuilder/source/content/zh/docs/Appendix/public_sys-resources/icon-warning.png differ diff --git "a/docBuilder/source/content/zh/docs/Appendix/\344\272\247\345\223\201FAQ.md" "b/docBuilder/source/content/zh/docs/Appendix/\344\272\247\345\223\201FAQ.md" new file mode 100644 index 0000000000000000000000000000000000000000..eab9f6dab6353d152309196b22f0d26f9318efc6 --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\344\272\247\345\223\201FAQ.md" @@ -0,0 +1,34 @@ +# 产品FAQ + +### **Q1:“极致RTO”、“并行恢复”与“备机可读”的关系是什么?** + +**回答:** + +极致RTO、并行恢复、备机可读配置分别如下: + +- 极致RTO配置:recovery\_parse\_workers表明并行恢复时解析Xlog线程的个数。recovery\_parallelism表明并行恢复线程的实际个数。当recovery\_parse\_workers大于1时是极致RTO恢复。当recovery\_parse\_workers和recovery\_parallelism同时配置大于1时,才会实现并行恢复。 +- 并行恢复配置:recovery\_max\_workers指定并行恢复的最大线程个数。recovery\_parallelism指定并行恢复线程的实际个数。当recovery\_max\_workers大于1时是并行恢复。当recovery\_max\_workers和recovery\_parallelism同时配置大于1时,才会实现并行恢复。 +- 备机可读配置:hot\_standby表明热备机在恢复时支持读操作。如果hot\_standby为true时,备机可读。 + +并行恢复是文件级别的并行REDO,极致RTO是数据块级别的并行恢复。并行恢复和备机可读是兼容的,极致RTO和备机可读是不兼容的。 配置上面参数时,代码中有检查(CheckExtremeRtoGUCConflicts),如果同时配置了recovery\_parse\_workers大于1和hot\_standby会报错。 + +### **Q2:极致RTO场景下,备机不能读,那该如何选择主备切换的候选主节点?** + +**回答:** + +备机只有极致RTO情况下不能读,在串行恢复、并行恢复情况下,备机都是可读的。如果使用极致RTO,即在极致RTO情况下,当前只能配置为同步方式,然后随机选择一个当做主机即可(配置为同步方式后所有节点数据是一样的)。 + +### **Q3:模板数据库的作用是什么?模板数据库中包含哪些表?** + +**回答:** + +模板数据库提供了一个快速创建数据库的手段,创建数据库时指定**TEMPLATE**参数,即可通过复制模板数据库创建数据库。 + +模板数据库中没有用户表,可通过系统表PG\_DATABASE查看模板数据库属性。 + +### **Q4:openGauss支持物理复制时,备机是按照Page并行回放日志吗?** + +**回答:** + +openGauss有两种并行恢复模式,一种是以文件为粒度,一种是以页面为粒度。 + diff --git "a/docBuilder/source/content/zh/docs/Appendix/\344\275\277\347\224\250FAQ.md" "b/docBuilder/source/content/zh/docs/Appendix/\344\275\277\347\224\250FAQ.md" new file mode 100644 index 0000000000000000000000000000000000000000..96c5a67a5cbfe1bee334c0e3ffcfbdc7adc05e1b --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\344\275\277\347\224\250FAQ.md" @@ -0,0 +1,69 @@ +# 使用FAQ + +### **Q1:gsql连接数据库,提示“unknow:26000”,错误如下,要如何处理?** + +``` +gsql -d postgres -p 26000 -r +failed to connect Unkown:26000. +``` + +**回答:** + +首先确认数据库端口号是否为26000,如果端口号无误,可能是没有启动数据库服务造成此报错。请执行如下命令启动数据库服务。 + +``` +gs_om -t start +``` + +### **Q2:第一次使用数据库报错,提示需要修改用户名密码,要如何处理?** + +**回答:** + +第一次使用数据库,必须修改omm用户密码,使用如下语句。 + +``` +alter role omm identified by '新密码' replace '旧密码'; +``` + +如果忘记omm密码,无法进行修改,可以使用如下命令关闭密码修改设置。 + +``` +--退出数据库。 +\q +--关闭密码修改设置。 +gs_guc reload -N all -I all -c "modify_initial_password = false" +``` + +### **Q3:执行如下命令时,报错提示PID不存在,如何处理?** + +![](figures/zh-cn_image_0000001103872542.png) + +**回答:** + +此命令用于重新启动数据库服务,如果之前数据库处于未启动状态,则提示不存在PID。此提示可以忽略,直接进行后续步骤。 + +### **Q4:Data Studio连接openGauss数据库时出现错误,提示“连接服务器出错,连接失败!”,如何处理?** + +**回答:** + +此问题可能是由于系统上的JDK版本不兼容造成的。JDK版本要求为1.8,建议您重新下载安装JDK并修改全局变量后再次尝试。 + + + +### **Q5:安装openGauss时,运行gs_ctl报错找不到程序路径或缺失so,如何处理?** + +**回答:** + +此问题可能是由于环境变量没有配置,造成的报错。建议通过配置环境变量的方式,解决此问题。 + +配置GAUSSHOME为所有二进制的目录,然后再配置LD_LIBRARY_PATH、PATH,示例代码如下。 + +``` +export GAUSSHOME=/xxxx +export LD_LIBRARY_PATH=$GAUSSHOME/lib::$LD_LIBRARY_PATH +export PATH=$GAUSSHOME/bin:$PATH +``` + +上述这些可以放在/etc/profile文件、 /home/user/.bashrc文件或者自定义的环境变量文件中。每次使用前,请source环境变量文件以初始化环境变量。 + +如果安装企业版openGauss,以上配置路径已经写入环境变量,将用户切换至子用户,导入环境变量,即可正常使用。 \ No newline at end of file diff --git "a/docBuilder/source/content/zh/docs/Appendix/\345\206\205\346\240\270\351\224\231\350\257\257\344\277\241\346\201\257.md" "b/docBuilder/source/content/zh/docs/Appendix/\345\206\205\346\240\270\351\224\231\350\257\257\344\277\241\346\201\257.md" new file mode 100644 index 0000000000000000000000000000000000000000..3570be2fd2773ca4db5d655acd4fcc03a8b2fb9f --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\345\206\205\346\240\270\351\224\231\350\257\257\344\277\241\346\201\257.md" @@ -0,0 +1,1322 @@ +# 内核错误信息 + +ERRMSG: "unsupported syntax: ENCRYPTED WITH in this operation" + +SQLSTATE: 42601 + +CAUSE: "client encryption feature is not supported this operation." + +ACTION: "Check client encryption feature whether supported this operation." + +ERRMSG: "invalid grant operation" + +SQLSTATE: 0LP01 + +CAUSE: "Grant options cannnot be granted to public." + +ACTION: "Grant grant options to roles." + +ERRMSG: "unrecognized object kind: %d" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "unrecognized GrantStmt.targtype: %d" + +SQLSTATE: XX004 + +CAUSE: "The target type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported target types." + +ERRMSG: "invalid grant operation" + +SQLSTATE: 0LP01 + +CAUSE: "Grant to public operation is forbidden in security mode." + +ACTION: "Don't grant to public in security mode." + +ERRMSG: "unrecognized object type" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "invalid grant/revoke operation" + +SQLSTATE: 0LP01 + +CAUSE: "Column privileges are only valid for relations in GRANT/REVOKE." + +ACTION: "Use the column privileges only for relations." + +ERRMSG: "invalid AccessPriv node" + +SQLSTATE: 0LP01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "unrecognized GrantStmt.objtype: %d" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "undefined client master key" + +SQLSTATE: 42705 + +CAUSE: "The client master key does not exist." + +ACTION: "Check whether the client master key exists." + +ERRMSG: "undefined column encryption key" + +SQLSTATE: 42705 + +CAUSE: "The column encryption key does not exist." + +ACTION: "Check whether the column encryption key exists." + +ERRMSG: "large object %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "The large object does not exist." + +ACTION: "Check whether the large object exists." + +ERRMSG: "redundant options" + +SQLSTATE: 42601 + +CAUSE: "The syntax 'schemas' is redundant in ALTER DEFAULT PRIVILEGES statement." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." + +ERRMSG: "redundant options" + +SQLSTATE: 42601 + +CAUSE: "The syntax 'roles' is redundant in ALTER DEFAULT PRIVILEGES statement." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." + +ERRMSG: "option '%s' not recognized" + +SQLSTATE: 42601 + +CAUSE: "The option in ALTER DEFAULT PRIVILEGES statement is not supported." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." + +ERRMSG: "unrecognized GrantStmt.objtype: %d" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for ALTER DEFAULT PRIVILEGES." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." + +ERRMSG: "invalid alter default privileges operation" + +SQLSTATE: 0LP01 + +CAUSE: "Default privileges cannot be set for columns." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." + +ERRMSG: "unrecognized objtype: %d" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for default privileges." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." + +ERRMSG: "could not find tuple for default ACL %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "unexpected default ACL type: %d" + +SQLSTATE: 0LP01 + +CAUSE: "The object type is not supported for default privilege." + +ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." + +ERRMSG: "invalid object id" + +SQLSTATE: 0LP01 + +CAUSE: "The object type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "undefined column" + +SQLSTATE: 42703 + +CAUSE: "The column of the relation does not exist." + +ACTION: "Check whether the column exists." + +ERRMSG: "column number out of range" + +SQLSTATE: 0LP01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for attribute %d of relation %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for relation %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "unsupported object type" + +SQLSTATE: 42809 + +CAUSE: "Index type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "unsupported object type" + +SQLSTATE: 42809 + +CAUSE: "Composite type is not supported for GRANT/REVOKE." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "wrong object type" + +SQLSTATE: 42809 + +CAUSE: "GRANT/REVOKE SEQUENCE only support sequence objects." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "invalid privilege type USAGE for table" + +SQLSTATE: 0LP01 + +CAUSE: "GRANT/REVOKE TABLE do not support USAGE privilege." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for tables." + +ERRMSG: "invalid privilege type %s for column" + +SQLSTATE: 0LP01 + +CAUSE: "The privilege type is not supported for column object." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for column object." + +ERRMSG: "cache lookup failed for database %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for foreign-data wrapper %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for foreign server %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for function %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for language %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "Grant/revoke on untrusted languages if forbidden." + +SQLSTATE: 0LP01 + +CAUSE: "Grant/revoke on untrusted languages if forbidden." + +ACTION: "Support grant/revoke on trusted C languages" + +ERRMSG: "Forbid grant language c to user with grant option." + +SQLSTATE: 0A000 + +CAUSE: "Forbid grant language c to user with grant option." + +ACTION: "Only support grant language c to user." + +ERRMSG: "Forbid grant language c to public." + +SQLSTATE: 0A000 + +CAUSE: "Forbid grant language c to public." + +ACTION: "Grant language c to specified users." + +ERRMSG: "cache lookup failed for large object %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for namespace %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for tablespace %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for type %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cannot set privileges of array types" + +SQLSTATE: 0LP01 + +CAUSE: "Cannot set privileges of array types." + +ACTION: "Set the privileges of the element type instead." + +ERRMSG: "wrong object type" + +SQLSTATE: 42809 + +CAUSE: "GRANT/REVOKE DOMAIN only support domain objects." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "cache lookup failed for data source %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for client master key %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for column encryption key %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "cache lookup failed for directory %u" + +SQLSTATE: 29P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "unrecognized privilege type '%s'" + +SQLSTATE: 42601 + +CAUSE: "The privilege type is not supported." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." + +ERRMSG: "unrecognized privilege: %d" + +SQLSTATE: XX004 + +CAUSE: "The privilege type is not supported." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." + +ERRMSG: "unrecognized AclResult" + +SQLSTATE: XX004 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "permission denied for column '%s' of relation '%s'" + +SQLSTATE: 42501 + +CAUSE: "Insufficient privileges for the column." + +ACTION: "Select the system tables to get the acl of the column." + +ERRMSG: "role with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "unrecognized objkind: %d" + +SQLSTATE: XX004 + +CAUSE: "The object type is not supported for privilege check." + +ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." + +ERRMSG: "attribute %d of relation with OID %u does not exist" + +SQLSTATE: 42703 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "the column has been dropped" + +SQLSTATE: 42703 + +CAUSE: "The column does not exist." + +ACTION: "Check whether the column exists." + +ERRMSG: "relation with OID %u does not exist" + +SQLSTATE: 42P01 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "invalid group" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "database with OID %u does not exist" + +SQLSTATE: 3D000 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "directory with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "function with OID %u does not exist" + +SQLSTATE: 42883 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "client master key with OID %u does not exist" + +SQLSTATE: 42705 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "language with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "large object %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "schema with OID %u does not exist" + +SQLSTATE: 3F001 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "tablespace with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "foreign-data wrapper with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "foreign server with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "data source with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "type with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "operator with OID %u does not exist" + +SQLSTATE: 42883 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "column encryption key with OID %u does not exist" + +SQLSTATE: 42705 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "operator class with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "operator family with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "text search dictionary with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "text search configuration with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "collation with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "conversion with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "Extension with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "synonym with OID %u does not exist" + +SQLSTATE: 42704 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "package can not create the same name with schema." + +SQLSTATE: 22023 + +CAUSE: "Package name conflict" + +ACTION: "Please rename package name" + +ERRMSG: "type is not exists %s." + +SQLSTATE: 22023 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "This input type is not supported for tdigest\_in\(\)" + +SQLSTATE: 0A000 + +CAUSE: "input type is not supported" + +ACTION: "Check tdigest\_in syntax to obtain the supported privilege types" + +ERRMSG: "Failed to apply for memory" + +SQLSTATE: 53200 + +CAUSE: "palloc failed" + +ACTION: "Check memory" + +ERRMSG: "Failed to get tde info from relation '%s'." + +SQLSTATE: XX005 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "SPI\_connect failed: %s" + +SQLSTATE: SP001 + +CAUSE: "System error." + +ACTION: "Analyze the error message before the error" + +ERRMSG: "permission denied for terminate snapshot thread" + +SQLSTATE: 42501 + +CAUSE: "The user does not have system admin privilege" + +ACTION: "Grant system admin to user" + +ERRMSG: "terminate snapshot thread failed" + +SQLSTATE: OP001 + +CAUSE: "Execution failed due to: %s" + +ACTION: "check if snapshot thread exists" + +ERRMSG: "terminate snapshot thread failed" + +SQLSTATE: OP001 + +CAUSE: "restart wdr snapshot thread timeoutor The thread did not respond to the kill signal" + +ACTION: "Check the wdr snapshot thread is restarted" + +ERRMSG: "set lockwait\_timeout failed" + +SQLSTATE: XX000 + +CAUSE: "System error." + +ACTION: "Contact engineer to support." + +ERRMSG: "permission denied for create WDR Snapshot" + +SQLSTATE: 42501 + +CAUSE: "The user does not have system admin privilege" + +ACTION: "Grant system admin to user" + +ERRMSG: "WDR snapshot request can not be accepted, please retry later" + +SQLSTATE: OP001 + +CAUSE: "wdr snapshot thread does not exist" + +ACTION: "Check if wdr snapshot thread exists" + +ERRMSG: "Cannot respond to WDR snapshot request" + +SQLSTATE: OP001 + +CAUSE: "Execution failed due to: %s" + +ACTION: "Check if wdr snapshot thread exists" + +ERRMSG: "query\(%s\) can not get datum values" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "create sequence failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check if sequence can be created" + +ERRMSG: "update snapshot end time stamp filled" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "query can not get datum values" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "SPI\_connect failed: %s" + +SQLSTATE: XX000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "query\(%s\) execute failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "clean table of snap\_%s is failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "analyze table failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "insert into tables\_snap\_timestamp start time stamp is failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "insert data failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" + +ERRMSG: "update tables\_snap\_timestamp end time stamp is failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "clean snapshot id %lu is failed in snapshot table" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" + +ERRMSG: "clean snapshot failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "can not create snapshot stat table" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "create WDR snapshot data table failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "insert into tables\_snap\_timestamp start time stamp failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "insert into snap\_%s is failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "update tables\_snap\_timestamp end time stamp failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "create index failed" + +SQLSTATE: 22000 + +CAUSE: "System error." + +ACTION: "Check whether the query can be executed" + +ERRMSG: "analyze table, connection failed: %s" + +SQLSTATE: XX000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "snapshot thread SPI\_connect failed: %s" + +SQLSTATE: XX000 + +CAUSE: "System error." + +ACTION: "Check whether the snapshot retry is successful" + +ERRMSG: "Distributed key column can't be transformed" + +SQLSTATE: 42P10 + +CAUSE: "There is a risk of violating uniqueness when transforming distribution columns." + +ACTION: "Change transform column." + +ERRMSG: "cannot convert %s to %s" + +SQLSTATE: 42804 + +CAUSE: "There is no conversion path in pg\_cast." + +ACTION: "Rewrite or cast the expression." + +ERRMSG: "create matview on TDE table failed" + +SQLSTATE: 0A000 + +CAUSE: "create materialized views is not supported on TDE table" + +ACTION: "check CREATE syntax about create the materialized views" + +ERRMSG: "schema name can not same as package" + +SQLSTATE: 22023 + +CAUSE: "schema name conflict" + +ACTION: "rename schema name" + +ERRMSG: "Unrecognized commandType when checking read-only attribute." + +SQLSTATE: XX004 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Fail to generate subquery plan." + +SQLSTATE: XX005 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Unrecognized node type when processing qual condition." + +SQLSTATE: XX004 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Unrecognized node type when processing const parameters." + +SQLSTATE: XX004 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "SELECT FOR UPDATE/SHARE is not allowed with UNION/INTERSECT/EXCEPT" + +SQLSTATE: 0A000 + +CAUSE: "SQL uses unsupported feature." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "GROUP BY cannot be implemented." + +SQLSTATE: 0A000 + +CAUSE: "GROUP BY uses unsupported datatypes." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "TSDB functions cannot be used if enable\_tsdb is off." + +SQLSTATE: D0011 + +CAUSE: "Functions are not loaded." + +ACTION: "Turn on enable\_tsdb according to manual." + +ERRMSG: "Unrecognized node type when extracting index." + +SQLSTATE: XX004 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Ordering operator cannot be identified." + +SQLSTATE: 42883 + +CAUSE: "Grouping set columns must be able to sort their inputs." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "DISTINCT cannot be implemented." + +SQLSTATE: 0A000 + +CAUSE: "DISTINCT uses unsupported datatypes." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "Failed to locate grouping columns." + +SQLSTATE: 55000 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Resjunk output columns are not implemented." + +SQLSTATE: 20000 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "PARTITION BY cannot be implemented." + +SQLSTATE: 0A000 + +CAUSE: "PARTITION BY uses unsupported datatypes." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "ORDER BY cannot be implemented." + +SQLSTATE: 0A000 + +CAUSE: "ORDER BY uses unsupported datatypes." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "Failed to deconstruct sort operators into partitioning/ordering operators." + +SQLSTATE: D0011 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "OBS and HDFS foreign table can NOT be in the same plan." + +SQLSTATE: XX008 + +CAUSE: "SQL uses unsupported feature." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "Pool size should not be zero" + +SQLSTATE: 22012 + +CAUSE: "Compute pool configuration file contains error." + +ACTION: "Please check the value of 'pl' in cp\_client.conf." + +ERRMSG: "Failed to get the runtime info from the compute pool." + +SQLSTATE: 22004 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "Version is not compatible between local cluster and the compute pool." + +SQLSTATE: XX008 + +CAUSE: "Compute pool is not installed appropriately." + +ACTION: "Configure compute pool according to manual." + +ERRMSG: "No optional index path is found." + +SQLSTATE: 01000 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "MERGE INTO on replicated table does not yet support using distributed tables." + +SQLSTATE: 0A000 + +CAUSE: "SQL uses unsupported feature." + +ACTION: "Modify SQL statement according to the manual." + +ERRMSG: "Fail to find ForeignScan node!" + +SQLSTATE: P0002 + +CAUSE: "System error." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "sql advisor don't support none table, temp table, system table." + +SQLSTATE: 42601 + +CAUSE: "sql advisor don't support none table, temp table, system table." + +ACTION: "check query component" + +ERRMSG: "Invalid autonomous transaction return datatypes" + +SQLSTATE: P0000 + +CAUSE: "PL/SQL uses unsupported feature." + +ACTION: "Contact Huawei Engineer." + +ERRMSG: "new row for relation '%s' violates check constraint '%s'" + +SQLSTATE: 23514 + +CAUSE: "some rows copy failed" + +ACTION: "check table defination" + +ERRMSG: "new row for relation '%s' violates check constraint '%s'" + +SQLSTATE: 23514 + +CAUSE: "some rows copy failed" + +ACTION: "set client\_min\_messages = info for more details" + +ERRMSG: "get gauss home path is NULL" + +SQLSTATE: XX005 + +CAUSE: "gauss home path not set" + +ACTION: "check if $GAUSSHOME is exist" + +ERRMSG: "unable to open kms\_iam\_info.json file" + +SQLSTATE: 58P03 + +CAUSE: "file not exist or broken" + +ACTION: "check the kms\_iam\_info.json file" + +ERRMSG: "can not get password plaintext" + +SQLSTATE: XX005 + +CAUSE: "file not exist or broken" + +ACTION: "check the password cipher rand file" + +ERRMSG: "IAM info json key is NULL" + +SQLSTATE: XX005 + +CAUSE: "IAM info value error" + +ACTION: "check tde\_config kms\_iam\_info.json file" + +ERRMSG: "get internal password is NULL" + +SQLSTATE: XX005 + +CAUSE: "cipher rand file missing" + +ACTION: "check password cipher rand file" + +ERRMSG: "KMS info json key is NULL" + +SQLSTATE: XX005 + +CAUSE: "KMS info value error" + +ACTION: "check tde\_config kms\_iam\_info.json file" + +ERRMSG: "unable to get json file" + +SQLSTATE: 58P03 + +CAUSE: "parse json file failed" + +ACTION: "check the kms\_iam\_info.json file format" + +ERRMSG: "get JSON tree is NULL" + +SQLSTATE: XX005 + +CAUSE: "get KMS JSON tree failed" + +ACTION: "check input prarmeter or config.ini file" + +ERRMSG: "failed to get json tree" + +SQLSTATE: XX005 + +CAUSE: "config.ini json tree error" + +ACTION: "check input prarmeter or config.ini file" + +ERRMSG: "failed to set the value of json tree" + +SQLSTATE: XX005 + +CAUSE: "config.ini json tree error" + +ACTION: "check input prarmeter or config.ini file" + +ERRMSG: "http request failed" + +SQLSTATE: XX005 + +CAUSE: "http request error" + +ACTION: "check KMS or IAM connect or config parameter" + +ERRMSG: "get iam token or iam agency token is NULL" + +SQLSTATE: XX005 + +CAUSE: "connect IAM failed" + +ACTION: "check if your env can connect with IAM server" + +ERRMSG: "KMS dek json key is NULL" + +SQLSTATE: XX005 + +CAUSE: "KMS return value error" + +ACTION: "check KMS config paramenter" + +ERRMSG: "get kms dek is NULL" + +SQLSTATE: XX005 + +CAUSE: "connect KMS failed" + +ACTION: "check if your env can connect with KMS server" + +ERRMSG: "get http header is NULL" + +SQLSTATE: XX005 + +CAUSE: "http request failed" + +ACTION: "check IAM config parameter" + +ERRMSG: "create KMS dek failed" + +SQLSTATE: XX005 + +CAUSE: "KMS error" + +ACTION: "check KMS connect or config parameter" + +ERRMSG: "get KMS dek failed" + +SQLSTATE: XX005 + +CAUSE: "KMS error" + +ACTION: "check KMS connect or config parameter" + +ERRMSG: "get KMS DEK is NULL" + +SQLSTATE: XX005 + +CAUSE: "get KMS dek\_plaintext failed" + +ACTION: "check KMS network or cipher is right" + +ERRMSG: "create matview with TDE failed" + +SQLSTATE: 0A000 + +CAUSE: "TDE feature is not supported for Create materialized views" + +ACTION: "check CREATE syntax about create the materialized views" + +ERRMSG: "failed to add item to the index page" + +SQLSTATE: XX002 + +CAUSE: "System error." + +ACTION: "Check WARNINGS for the details." + +ERRMSG: "index row size %lu exceeds maximum %lu for index '%s'" + +SQLSTATE: 54000 + +CAUSE: "Values larger than 1/3 of a buffer page cannot be indexed." + +ACTION: "Consider a function index of an MD5 hash of the value, or use full text indexing." + diff --git "a/docBuilder/source/content/zh/docs/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.md" "b/docBuilder/source/content/zh/docs/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.md" new file mode 100644 index 0000000000000000000000000000000000000000..678de6b5254dc69ae19f674b534e78f45ed9ed59 --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\345\270\270\350\247\201\351\227\256\351\242\230\350\247\243\347\255\224FAQ.md" @@ -0,0 +1,3 @@ +# FAQ + +本文档是openGauss常见问题指南。 \ No newline at end of file diff --git "a/docBuilder/source/content/zh/docs/Appendix/\346\234\257\350\257\255\350\241\250.md" "b/docBuilder/source/content/zh/docs/Appendix/\346\234\257\350\257\255\350\241\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..9ff2636574df7214ffff5396a3568202db26b00e --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\346\234\257\350\257\255\350\241\250.md" @@ -0,0 +1,672 @@ +# 术语表 + +**表 1** 术语表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

术语

+

解释

+

A – E

+

ACID

+

在可靠数据库管理系统(DBMS)中,事务(transaction)所应该具有的四个特性:原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)和持久性(Durability)。

+

AZ

+

Available Zone,通常指一个机房。

+

Bgwriter

+

数据库启动时创建的一个后台写线程,此线程用于将数据库中脏页面写入到持久性设备(例如磁盘)中。

+

bit

+

比特。计算机处理的最小的信息单位。比特用来表示二进制数字1或0,或者一种逻辑条件真或假。在物理上,比特表示一个电路上高或低的电压点或者磁盘上的磁化单程或其它。一个单独的比特位所传达的信息很少有意义的。然而,一个8位组却构成了一个字节,可用于表示如一个英文字母,十进制数字,或其它字符等多种类型的信息。

+

Bloom Filter

+

布隆过滤器。由Howard Bloom在1970年提出的二进制向量数据结构,它具有很好的空间和时间效率,被用来检测一个元素是不是集合中的一个成员,这种检测只会对在集合内的数据错判,而不会对不是集合内的数据进行错判,这样每个检测请求返回有“在集合内(可能错误)”和“不在集合内(绝对不在集合内)”两种情况,可见Bloom filter是牺牲了正确率换取时间和空间。

+

CEK

+

Column Encryption Key,列加密密钥。

+

CIDR

+

Classless Inter-Domain Routing,无类域间路由IP编址方案。CIDR摒弃传统的基于类(A类:8,B类:16,C类:24)的地址分配方式,允许使用任意长度的地址前缀,有效提高地址空间的利用率。CIDR表示方法:IP地址/网络ID的位数。比如192.168.23.35/21,其中“21”表示前面地址中的前21位代表网络部分,其余位代表主机部分。

+

CLI

+

Command-line Interface,命令行界面。应用程序和用户交互的一种方式,完全基于文本输入和输出。命令通过键盘或类似装置输入,由程序编译并执行。结果是以文本或图形的方式呈现在终端界面。

+

CMK

+

Client Master Key,客户端加密主密钥。

+

CU

+

Compression Unit,压缩单元。列存表的最小存储单位。

+

core文件

+

当程序出现内存越界、断言失败或者访问非法内存时,操作系统会中止进程,并将当前内存状态导出到core文件中,以便进一步分析。

+

core文件包含内存转储,支持全二进制和指定端口格式。core文件名称由字符串core以及操作系统进程ID组成。

+

core文件不依赖于任何平台。

+

Core Dump

+

通常在程序异常终止时,核心转储(Core Dump)、内存转储或系统转储用于记录特定时间计算机程序工作内存的状态。实际上,其它关键程序的状态经常在同一时间进行转储,例如处理器寄存器,包括程序指标和栈指针、内存管理信息、其它处理器和操作系统标记及信息。Core Dump经常用于辅助诊断和纠错计算机程序问题。

+

DBA

+

Database Administrator,数据库管理员。指导或执行所有和维护数据库环境相关的操作。

+

DBLINK

+

DBLINK是定义一个数据库到另一个数据库路径的对象,通过它可以查询远程数据库对象。

+

DBMS

+

Database Management System,数据库管理系统。数据库管理系统是为了访问数据库中的信息而使用的一个管理系统软件。它包含一组程序使用户可以进入、管理、查询数据库中数据。基于真实数据的位置,可以分为内存数据库管理系统和磁盘数据库管理系统。

+

DCL

+

Data Control Language,数据控制语言。

+

DDL

+

Data Definition Language,数据定义语言。

+

DML

+

Data Manipulation Language,数据操纵语言。

+

备份

+

备份件或者备份过程。指复制并归档计算机数据,当发生数据丢失事件时,可以用该复制并归档的数据来恢复原始数据。

+

备份和恢复

+

保护数据库防止由于媒介失效或人为错误造成的数据丢失过程中涉及的一组概念、过程及策略。

+

备机

+

openGauss双机方案中的一个节点,用于作为主机的备份,在主机异常时,备机会切换到主机状态,以确保能正常提供数据服务。

+

崩溃

+

崩溃(或系统崩溃)指计算机或程序(例如软件应用程序或操作系统)异常终止的事件。出现错误后,通常会自动退出。有时出现恶意程序冻结或挂起直到崩溃上报服务记录崩溃的详细信息。对于操作系统内核关键部分的程序,整个计算机可能瘫痪(可能造成致命的系统错误)。

+

编码

+

编码是指用代码来表示各组数据资料,使其成为可利用计算机进行处理和分析的信息。用预先规定的方法将文字、数字或其它对象编成数码,或将信息、数据转换成规定的电脉冲信号。

+

编码技术

+

呈现计算机软硬件识别的特定字符集数据的技术。

+

+

表是由行与列组合成的。每一列被当作是一个字段。每个字段中的值代表一种类型的数据。例如,一个表可能有3个字段:姓名、城市和国家。这个表就会有3列:一列代表姓名,一列代表城市,一列代表国家。表中的每一行包含3个字段的内容,姓名字段包含姓名,城市字段包含城市,国家字段包含国家。

+

表空间

+

包含表、索引、大对象、长数据等数据的逻辑存储结构。表空间在物理数据和逻辑数据间提供了抽象的一层,为所有的数据库对象分配存储空间。表空间创建好后,创建数据库对象时可以指定该对象所属的表空间。

+

并发控制

+

在多用户环境下同时执行多个事务并保证数据完整性的一个DBMS服务。并发控制是openGauss提供的一种多线程管理机制,用来保证多线程环境下在数据库中执行的操作是安全的和一致的。

+

查询

+

向数据库发出的信息请求,包含更新、修改、查询或删除信息的请求。

+

查询操作符

+

Query Operator,也称为查询迭代算子(Iterator)或查询节点(Query Tree Node)。一个查询的执行可以分解为一个或多个查询操作符,是构成一个查询执行的最基本单位。常见的查询操作符包括表扫描(Scan)、表关联(Join)、表聚集(Aggregation)等。

+

持久性

+

数据库事务的ACID特性之一。在事务完成以后,该事务对数据库所作的更改便持久的保存在数据库之中,并不会被回滚。

+

存储过程

+

存储过程(StoredProcedure)是在大型数据库系统中,一组为了完成特定功能的SQL语句集,经编译后存储在数据库中,用户通过指定存储过程的名称并设置参数(如果该存储过程带有参数)来执行它。

+

操作系统

+

操作系统OS(operating system)由引导程序加载到计算中,对计算机中其它程序进行管理。其它程序叫做应用或应用程序。

+

大对象

+

大对象(Blob)在数据库中指使用二进制方式存储的数据。它通常可以用于存储视频、音频和图像等多媒体数据。

+

+

数据库中,一段指包含一个或多个区域的数据库中的一部分。区域是数据库的最小范围,由单元调用块组成。一个或多个段组成一个表空间。

+

F – J

+

Failover

+

指当某个节点出现故障时,自动切换到备节点上的过程。反之,从备节点上切换回来的过程称为Failback。

+

FDW

+

Foreign Data Wrapper,外部数据封装器。是Postgres提供的一个SQL接口,用于访问远程数据存储中的大数据对象,使DBA可以整合来自不相关数据源的数据,将它们存入数据库中的一个公共模型。

+

Freeze

+

在事务ID耗尽时由AutoVacuum Worker进程自动执行的操作。openGauss会把事务ID记在行头,在一个事务取得一行时,通过比较行头的事务ID和事务本身的ID判断这行是否可见,而事务ID是一个无符号整数,如果事务ID耗尽,事务ID会跨过整数的界限重新计算,此时原先可见的行就会变成不可见的行,为了避免这个问题,Freeze操作会将行头的事务标记为一个特殊的事务ID,标记了这个特殊的事务ID的行将对所有事务可见,以此避免事务ID耗尽产生的问题。

+

GDB

+

GNU工程调试器,可以监控其它程序运行时的内部情况,或者其它程序要崩溃时发生了什么。GDB支持如下四种主要操作(使PDK功能更加强大),辅助查找缺陷。

+
  • 启动程序,指定可能影响行为的任何因素。
+
  • 特定条件下,停止程序。
+
  • 程序停止时,检查发生了什么。
+
  • 修改程序内容,尝试纠正一个缺陷并继续下一个。
+

GIN索引

+

Generalized Inverted Index,通用倒排索引。作用为处理索引项为组合值的情况,查询时需要通过索引搜索出出现在组合值中的特定元素值。

+

GNU

+

GNU计划,又称革奴计划,是由RichardStallman在1983年9月27日公开发起的。它的目标是创建一套完全自由的操作系统。GNU是“GNU's NotUnix”的递归缩写。Stallman宣布GNU应当发音为Guh-NOO以避免与new这个单词混淆(注:Gnu在英文中原意为非洲牛羚,发音与new相同)。Unix是一种广泛使用的商业操作系统的名称。技术上讲,GNU类似Unix。但是GNU却给了用户自由。

+

gsql

+

openGauss交互终端。通过gsql能够以交互的方式输入查询,下发查询到openGauss,然后查看查询结果。或者,也可以从文件中输入。此外,gsql还提供许多元命令和各种类似shell命令,协助脚本编写及自动化各种任务。

+

GUC

+

Grand Unified Configuration,数据库运行参数。配置这些参数可以影响数据库系统的行为。

+

HA

+

高可用性(HighAvailability),通过尽量缩短因日常维护操作(计划)和突发的系统崩溃(非计划)所导致的停机时间,以提高系统和应用的可用性。

+

HBA

+

host-based authentication,主机认证。主机鉴权允许主机鉴权部分或全部系统用户。适用于系统所有用户或者使用Match指令的子集。该类型鉴权对于管理计算以及其它完全同质设备非常有用。总之,服务器上的三个文件以及客户端上的一个文件必须修改,为主机鉴权做准备。

+

服务器

+

为客户端提供服务的软硬件的组合。单独使用时,指运行服务器操作系统的计算机,也可以指提供服务的软件或者专用硬件。

+

隔离性

+

数据库事务的ACID特性之一。它是指一个事务内部的操作及使用的数据对其它并发事务是隔离的,并发执行的各个事务之间不能互相干扰。

+

关系型数据库

+

创建在关系模型基础上的数据库。关系型数据库借助于集合代数等数学概念和方法来处理数据库中的数据。

+

归档线程

+

数据库打开归档功能时启动的一个线程,此线程用于将数据库日志归档到指定的路径。

+

故障接管

+

功能对等的系统部件对于故障部件的自动替换过程。系统部件包含处理器、服务器、网络、数据库等。

+

环境变量

+

定义进程操作环境某一方面的变量。例如,环境变量可以为主目录,命令搜索路径,使用终端或当前时区。

+

检查点

+

将数据库内存中某一时刻的数据存到磁盘的机制。openGauss定期将已提交的事务数据和未提交的事务数据存到磁盘,这些数据用来和Redo日志一起在数据库重启和崩溃时恢复数据库。

+

加密

+

用于传输数据的功能。通过该功能,可以隐藏信息内容,防止非法使用。

+

节点

+

将构成openGauss数据库环境的各台服务器(物理机或虚拟机)称为数据库节点,简称节点。

+

纠错

+

系统自动识别软件和数据流上的错误并自动修正错误的能力,提升系统的稳定性和可靠性。

+

进程

+

在单个计算机上执行程序的实例。一个进程由一个或多个线程组成。其它进程不能接入某个进程已占用的线程。

+

基于时间点恢复

+

PITR(Point-In-TIme Recovery),基于时间点恢复是openGauss备份恢复的一个特性,是指在备份数据和WAL日志正常的情况下,数据可以恢复到指定时间点。

+

记录

+

在关系型数据库中,每一条记录对应表中的每一行数据。

+

KMC

+

Key Management Component,密钥管理组件。

+

KMS

+

Key Management Service,密钥管理服务。

+

KSF

+

Key Store File,密钥存储文件。

+

K – O

+

逻辑复制

+

数据库主备或两个数据库间的数据同步方式。区别于通过物理日志回放方式的物理复制,逻辑复制在两个数据库间传输逻辑日志或通过逻辑日志对应的SQL语句实现数据同步。

+

逻辑日志

+

数据库修改的日志记录,可直接对应为SQL语句,一般为行级记录。区别于物理日志,物理日志是记录物理页面修改的日志。

+

逻辑解码

+

逻辑解码是一种通过对xlog日志的反解实现将数据库表的所有持久更改抽取到一种清晰、易于理解的格式的处理过程。

+

逻辑复制槽

+

在逻辑复制的环境下,逻辑复制槽用以防止Xlog被系统或Vaccum回收。openGauss中用于记录逻辑解码位置的对象,提供创建、删除、读取、推进等多个SQL接口函数。

+

MVCC

+

Multi-Version Concurrency Control,多版本并发控制。数据库并发控制协议的一种,它的基本算法是一个元组可以有多个版本,不同的查询可以工作在不同的版本上。一个基本的好处是读和写可以不冲突。

+

NameNode

+

NameNode是Hadoop系统中的一个中心服务器,负责管理文件系统的名称空间(namespace)以及客户端对文件的访问。

+

OM

+

Operations Management,运维管理模块。提供数据库日常运维、配置管理的管理接口、工具。

+

客户端

+

连接或请求其它计算机或程序服务的计算机或程序。

+

空闲空间管理

+

管理表内空闲空间的机制,通过记录每个表内空闲空间信息,并建立易于查找的数据结构,可以加速对空闲空间进行的操作(例如INSERT)。

+

垃圾元组

+

是指使用DELETE和UPDATE语句删除的元组,openGauss在删除元组时只是打个删除标记,由Vacuum线程清理这种垃圾元组。

+

+

字段的等效概念。在数据库中,表由一列或多列组成。

+

逻辑节点

+

一个物理节点上可以安装多个逻辑节点。一个逻辑节点是一个数据库实例。

+

模式

+

数据库对象集,包括逻辑结构,例如表、视图、序、存储过程、同义名、索引及数据库链接。

+

模式文件

+

用于决定数据库结构的SQL文件。

+

P – T

+

Page

+

openGauss数据库关系对象结构中行存的最小内存单元。一个Page大小默认为8KB。

+

PostgreSQL

+

PostgreSQL是一个开源的关系数据库管理系统(DBMS),由全球志愿者团队开发。PostgreSQL不受任何公司或个体所控制,源代码免费使用。

+

Postmaster

+

数据库服务启动时启动的一个线程。用于侦听来自数据库其它节点或客户端的连接请求。

+

主机上侦听到备机连接请求,并接受后,就会创建一个WAL Sender线程,用于处理与备机的交互。

+

RHEL

+

Red Hat Enterprise Linux,红帽企业Linux。

+

REDO日志

+

记录对数据库进行操作的日志,这些日志包含重新执行这些操作所需要的信息。当数据库故障时,可以利用REDO日志将数据库恢复到故障前的状态。

+

RK

+

Root Key,加密根密钥。

+

SCTP

+

Stream Control Transmission Protocol,流控制传输协议。是IETF于2000年新定义的一个传输层协议。是提供基于不可靠传输业务的协议之上的可靠的数据报传输协议。SCTP的设计用于通过IP网传输SCN窄带信令消息。

+

Savepoint

+

保存点。是一种在关系数据库管理系统中实现子事务(也称为嵌套事务)的方法。在一个长事务中,可以把操作过程分成几部分,前面部分执行成功后,可以建一个保存点,若后面的执行失败,则回滚到这个保存点即可,无需回滚整个事务。保存点对于在数据库应用程序中实现复杂错误恢复很有用。如果在多语句事务中发生错误,则应用程序可能能够从错误中恢复(通过回滚到保存点)而无需中止整个事务。

+

Session

+

数据库系统在接收到应用程序的连接请求时,为该连接创建的一个任务。它被Session Manager管理,完成一些初始化任务,执行用户的所有操作。

+

SMP

+

Symmetric Multi-Processing,对称多处理技术,是指在一台计算机上汇集了一组处理器(多CPU),各CPU之间共享内存子系统以及总线结构。操作系统必须支持多任务和多线程处理,以使得SMP系统发挥高效的性能。数据库领域的SMP并行技术,一般指利用多线程技术实现查询的并行执行,以充分利用CPU资源,从而提升查询性能。

+

SQL

+

Structure Query Language,结构化查询语言。数据库的标准查询语言。它可以分为数据定义语言(DDL)、数据操纵语言(DML)和数据控制语言(DCL)。

+

SSL

+

Secure Socket Layer,安全套接层。SSL是Netscape公司率先采用的网络安全协议。它是在传输通信协议(TCP/IP)上实现的一种安全协议,采用公开密钥技术。SSL广泛支持各种类型的网络,同时提供三种基本的安全服务,它们都使用公开密钥技术。SSL支持服务通过网络进行通信而不损害安全性。它在客户端和服务器之间创建一个安全连接。然后通过该连接安全地发送任意数据量。

+

收敛比

+

交换机下行带宽与上行带宽的比值。收敛比越高,流量收敛程度越大,丢包越严重。

+

TCP

+

Transmission Control Protocol,传输控制协议。用于将数据信息分解成信息包,使之经过IP协议发送;并对利用IP协议接收来的信息包进行校验并将其重新装配成完整的信息。TCP是面向连接的可靠协议,能够确保信息的无误发送。

+

trace

+

一种特殊的日志记录方法,用来记录程序执行的信息。程序员使用该信息进行纠错。另外,根据trace日志中信息的类型和内容,有经验的系统管理员或技术支持人员以及软件监控工具诊断软件常见问题。

+

强一致性

+

任何查询不会瞬时的看到一个事务的中间状态。

+

全备份

+

备份整个数据库。

+

全量同步

+

openGauss双机方案中的一种数据同步机制,是指把主机中的所有数据同步给备机。

+

日志文件

+

计算机记录自身活动的记录。

+

事务

+

数据库管理系统执行过程中的一个逻辑单位,由一个有限的数据库操作序列构成,事务必须满足ACID原则。

+

数据

+

事实或指令的一种表达形式,适用于人为或自动的通信、解释或处理。数据包含常量、变量、阵列和字符串。

+

数据分区

+

数据分区是指在一个数据库实例内部,将表按照划分为多个数据互不重叠的部分(Partition)。具体的分区方式可以有:范围分区(Range),它根据元组中指定字段的取值所处的范围映射到目标存储位置。

+

数据库

+

数据库是存储在一起的相关数据的集合,这些数据可以被访问,管理以及更新。同一视图中,数据库可以根据存储内容类型分为以下几类:数目类、全文本类、数字类及图像类。

+

数据库实例

+

一个数据库实例是一个openGauss进程以及它控制的数据库文件。openGauss在一个物理节点上安装多个数据库实例。一个数据库实例也被称为一个逻辑节点。

+

数据库双机

+

openGauss提供的高可靠性双机方案。在此方案中,每个openGauss逻辑节点标识为主机或备机。在同一时间内,只有一个openGauss被标识为主机。双机初次建立时,主机会对每个备机数据做全量同步,然后做增量同步。双机建立之后的运行过程中,主机能接受数据读和写的操作请求,备机只做日志同步。

+

数据库文件

+

保存用户数据和数据库系统内部数据的二进制文件。

+

数据字典

+

数据字典是一系列只读的表,用来提供数据库的信息。这些信息包括:数据库设计信息、存储过程信息、用户权限、用户统计数据、数据库进程信息、数据库增长统计数据和数据库性能统计数据。

+

死锁

+

为使用同一资源而产生的无法解决的争用状态。

+

索引

+

数据库索引,是数据库管理系统中一个排序的数据结构,以协助快速查询、更新数据库表中数据。

+

统计信息

+

数据库使用统计信息估算查询代价,以查找代价最小的执行计划,统计信息一般是数据库自动收集的,包括表级信息(元组数、页面数等)和列级信息(列的值域分布直方图)。

+

停用词

+

在信息检索中,为节省存储空间和提高搜索效率,在处理自然语言数据(或文本)之前或之后会自动过滤掉某些字或词,这些字或词即被称为Stop Words(停用词)。

+

U – Z

+

Vacuum

+

数据库定期启动的清理垃圾元组的线程,根据配置参数可以同时启动多个。

+

verbose

+

verbose选项指定显示在屏幕上的处理信息。

+

WAL

+

Write-Ahead Logging,预写日志系统。实现事务日志的标准方法,是指对数据文件(表和索引的载体)持久化修改之前必须先持久化相应的日志。

+

WAL Receiver

+

数据库复制时备机创建的一个线程的名称。此线程用于从主机接收数据、命令,并反馈确认信息至主机。一个备机只有一个WAL Receiver线程。

+

WAL Sender

+

数据库复制过程中,主机接受到备机的连接请求后创建的一个线程的名称。此线程用于发送命令、数据到备机,并从备机接收信息。一个主机可能会有多个WAL Sender线程,每一个WAL Sender线程对应一个备机的一个连接请求。

+

WAL Writer

+

数据库启动时创建的一个写Redo日志的线程,用于将内存中的日志写入到持久性设备(如:磁盘)。

+

Xlog

+

表示事务日志,一个逻辑节点中只有一个,不允许创建多个Xlog文件。

+

xDR

+

详单。用户面和信令面详单的统称,包括CDR和UFDR、TDR和SDR。

+

物理节点

+

一个物理机器称为一个物理节点。

+

系统表

+

存储数据库元信息的表,元信息包括数据库中的用户表、索引、列、函数和数据类型等。

+

下推

+

openGauss可以利用多DN并行执行查询计划,即将数据库主节点中的查询计划下发到各DN中并行执行。这种行为称为下推。与将数据抽取到数据库主节点上执行查询的方式相比,下推可以大幅提升查询性能。

+

压缩

+

数据压缩,信源编码,或比特率降低涉及使用相比原来较少比特的编码信息。压缩可以是有损或无损。无损压缩通过识别和消除统计冗余降低比特位。无损压缩中没有信息丢失。有损压缩识别并删除次要信息,减少了比特位。减少数据文件大小的方法被普遍称为数据压缩,尽管其正式名称为源编码(数据源的编码,然后将其存储或传输)。

+

一致性

+

数据库事务的ACID特性之一。在事务开始之前和事务结束以后,数据库的完整性约束没有被破坏。

+

元数据

+

用来定义数据的数据。主要是描述数据自身信息,包含源、大小、格式或其它数据特征。数据库字段中,元数据用于理解以及诠释数据仓库的内容。

+

原子性

+

数据库事务的ACID特性之一。整个事务中的所有操作,要么全部完成,要么全部不完成,不可能停滞在中间某个环节。事务在执行过程中发生错误,会被回滚到事务开始前的状态,就像这个事务从来没有执行过一样。

+

脏页面

+

已经被修改且未写入持久性设备的页面。

+

增量备份

+

基于上次有效备份之后对文件修改的备份。

+

增量同步

+

openGauss双机方案中的一种数据同步机制,是指把主机中数据增量同步给备机,即只同步主备间有差异的数据。

+

主机

+

openGauss数据库双机系统中接受数据读写操作的节点,和所有备机一起协同工作。在同一时间内,双机系统中只有一个节点被标识为主机。

+

主题词

+

在标引和检索中用以表达文献主题的规范化的词或词组。

+

转储文件

+

转储文件是一种特定类型的trace文件。转储文件为响应事件过程中一次性输出的诊断数据,trace文件指诊断数据的连续输出。

+

最小恢复点

+

最小恢复点是openGauss提供的数据一致性保障手段之一。最小恢复点特性可以在openGauss启动时检查出WAL日志和持久化到磁盘的数据的不一致性,并提示用户进行处理。

+
diff --git "a/docBuilder/source/content/zh/docs/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.md" "b/docBuilder/source/content/zh/docs/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.md" new file mode 100644 index 0000000000000000000000000000000000000000..1f48b29f4eb3fb26499aebe9e2427a858c9e9dbe --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\351\224\231\350\257\257\346\227\245\345\277\227\344\277\241\346\201\257\345\217\202\350\200\203.md" @@ -0,0 +1,5 @@ +# 错误日志信息参考 + +- **[内核错误信息](内核错误信息.md)** + + diff --git "a/docBuilder/source/content/zh/docs/Appendix/\351\231\204\345\275\225.md" "b/docBuilder/source/content/zh/docs/Appendix/\351\231\204\345\275\225.md" new file mode 100644 index 0000000000000000000000000000000000000000..678de6b5254dc69ae19f674b534e78f45ed9ed59 --- /dev/null +++ "b/docBuilder/source/content/zh/docs/Appendix/\351\231\204\345\275\225.md" @@ -0,0 +1,3 @@ +# FAQ + +本文档是openGauss常见问题指南。 \ No newline at end of file diff --git a/docBuilder/source/index.rst b/docBuilder/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..7a28b11698bfc126b283ce674de2da0a43561a70 --- /dev/null +++ b/docBuilder/source/index.rst @@ -0,0 +1,11 @@ +.. openGauss documentation master file, created by + sphinx-quickstart on Mon Sep 18 22:31:39 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to openGauss's documentation! +===================================== + +.. toctree:: + Appendix/Appendix +