Skip to content

Commit 618f035

Browse files
committed
update pig and release info
1 parent 3a79002 commit 618f035

25 files changed

Lines changed: 451 additions & 161 deletions

content/pig/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ You can also check the [pigsty](https://pgsty.com) project, which makes it even
8080
{{< card link="https://github.com/pgsty/pig" title="PIG" icon="github" subtitle="The PostgreSQL Package Manager" >}}
8181
{{< card link="https://github.com/pgsty/pigsty" title="PIGSTY" icon="github" subtitle="The Battery-Included PostgreSQL Distribution" >}}
8282
{{< /cards >}}
83-

content/pig/cmd/_index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ pig ext info pg_duckdb # extension details
9999
pig ext status # show installed extensions
100100
pig ext add pg_duckdb -y # install extension
101101
pig ext rm old_extension # remove extension
102-
pig ext update # update extension
102+
pig ext update pg_duckdb # update selected extension
103103
pig ext scan # scan installed extensions
104104
pig ext import pg_duckdb # download for offline use
105-
pig ext link 17 # link PG version into PATH
105+
pig ext link polar # link PG/PolarDB installation into PATH
106106
pig ext reload # refresh extension catalog
107107
```
108108

@@ -114,10 +114,10 @@ Build PostgreSQL extensions from source. See [`pig build`](/pig/cmd/build/) for
114114
```bash
115115
# Environment setup
116116
pig build spec # initialize build specs
117-
pig build repo # configure repositories
117+
pig build repo -m # configure repositories with mirror/proxy
118118
pig build tool # install build tools
119-
pig build rust -y # force reinstall Rust (default does not reinstall)
120-
pig build pgrx # install PGRX framework
119+
pig build rust -m # install Rust with mirror config
120+
pig build pgrx -b # install PGRX and include beta PG auto-detect
121121

122122
# Build extensions
123123
pig build pkg citus # complete build pipeline = get + dep + ext
@@ -146,7 +146,7 @@ pig install pg_vector -y # auto-confirm installation
146146
Install the Pigsty distribution. See [`pig sty`](/pig/cmd/sty/) for details.
147147

148148
```bash
149-
pig sty init # install Pigsty to ~/pigsty
149+
pig sty init -m # install Pigsty from mirror to ~/pigsty
150150
pig sty boot # install Ansible prerequisites
151151
pig sty conf # generate configuration
152152
pig sty deploy # run deployment playbook

content/pig/cmd/_index.zh.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ pig ext info pg_duckdb # 扩展详情
102102
pig ext status # 显示已安装的扩展
103103
pig ext add pg_duckdb -y # 安装扩展
104104
pig ext rm old_extension # 移除扩展
105-
pig ext update # 更新扩展
105+
pig ext update pg_duckdb # 更新指定扩展
106106
pig ext scan # 扫描已安装的扩展
107107
pig ext import pg_duckdb # 下载以供离线使用
108-
pig ext link 17 # 链接 PG 版本到 PATH
108+
pig ext link polar # 链接 PG/PolarDB 安装到 PATH
109109
pig ext reload # 刷新扩展目录
110110
```
111111

@@ -119,10 +119,10 @@ pig ext reload # 刷新扩展目录
119119
```bash
120120
# 环境设置
121121
pig build spec # 初始化构建规格
122-
pig build repo # 设置仓库
122+
pig build repo -m # 使用镜像/代理设置仓库
123123
pig build tool # 安装构建工具
124-
pig build rust -y # 强制重装 Rust(默认不重装)
125-
pig build pgrx # 安装 PGRX 框架
124+
pig build rust -m # 使用镜像配置安装 Rust
125+
pig build pgrx -b # 安装 PGRX 并包含 beta PG 自动探测
126126

127127
# 构建扩展
128128
pig build pkg citus # 完整构建流程 = get + dep + ext
@@ -151,7 +151,7 @@ pig install pg_vector -y # 自动确认安装
151151
安装 Pigsty 发行版,详情请参考 [`pig sty`](/zh/pig/cmd/sty/)
152152

153153
```bash
154-
pig sty init # 安装 Pigsty 到 ~/pigsty
154+
pig sty init -m # 从镜像安装 Pigsty 到 ~/pigsty
155155
pig sty boot # 安装 Ansible 依赖
156156
pig sty conf # 生成配置
157157
pig sty deploy # 运行部署 playbook

content/pig/cmd/build.md

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ pig build - Build Postgres Extension
1313
Environment Setup:
1414
pig build spec # init build spec and directory (~ext)
1515
pig build repo # init build repo (=repo set -ru)
16+
pig build repo [--beta] # init build repo with PostgreSQL beta repo
1617
pig build tool [mini|full|...] # init build toolset
17-
pig build rust [-y] # install Rust toolchain
18-
pig build pgrx [-v <ver>] # install & init pgrx (0.19.1)
18+
pig build rust [-y] [-m] # install Rust toolchain
19+
pig build pgrx [-v <ver>] [-b] # install & init pgrx (0.19.1)
1920
pig build proxy [id@host:port ] # init build proxy (optional)
2021

2122
Package Building:
@@ -29,18 +30,18 @@ Quick Start:
2930
pig build pkg citus # build citus extension
3031
```
3132

32-
| Command | Description | Notes |
33-
|:---|:---|:---|
34-
| `build spec` | Initialize build specification directory | |
35-
| `build repo` | Initialize required repositories | Requires sudo or root |
36-
| `build tool` | Initialize build tools | Requires sudo or root |
37-
| `build rust` | Install Rust toolchain | Requires sudo or root |
38-
| `build pgrx` | Install and initialize pgrx | Requires sudo or root |
39-
| `build proxy` | Initialize build proxy | |
40-
| `build get` | Download source tarballs | |
41-
| `build dep` | Install extension build dependencies | Requires sudo or root |
42-
| `build ext` | Build extension packages | Requires sudo or root |
43-
| `build pkg` | Complete pipeline: get, dep, ext | Requires sudo or root |
33+
| Command | Description | Notes |
34+
|:--------------|:-----------------------------------------|:----------------------|
35+
| `build spec` | Initialize build specification directory | |
36+
| `build repo` | Initialize required repositories | Requires sudo or root |
37+
| `build tool` | Initialize build tools | Requires sudo or root |
38+
| `build rust` | Install Rust toolchain | Requires sudo or root |
39+
| `build pgrx` | Install and initialize pgrx | Requires sudo or root |
40+
| `build proxy` | Initialize build proxy | |
41+
| `build get` | Download source tarballs | |
42+
| `build dep` | Install extension build dependencies | Requires sudo or root |
43+
| `build ext` | Build extension packages | Requires sudo or root |
44+
| `build pkg` | Complete pipeline: get, dep, ext | Requires sudo or root |
4445
{.full-width}
4546

4647

@@ -136,10 +137,17 @@ Initialize package repositories required for building extensions.
136137

137138
```bash
138139
pig build repo # equivalent to: pig repo set -ru
140+
pig build repo -m # use mirror/proxy routes for PostgreSQL repos
141+
pig build repo -b # include PostgreSQL beta repository
139142
```
140143

141144
**What it does:** initializes build repositories with `pig repo set -ru`: remove old repositories, add required repositories, and refresh package caches.
142145

146+
**Options:**
147+
148+
- `-m|--mirror`: use Pigsty mirror/proxy routes for PostgreSQL repositories.
149+
- `-b|--beta`: include the PostgreSQL beta repository module, currently for PG19 beta builds.
150+
143151

144152
## build tool
145153

@@ -150,6 +158,7 @@ pig build tool # install default toolset
150158
pig build tool mini # minimal toolset
151159
pig build tool full # full toolset
152160
pig build tool rust # add Rust development tools
161+
pig build tool -b # include PostgreSQL beta build packages
153162
```
154163

155164
**Toolsets:**
@@ -158,6 +167,8 @@ pig build tool rust # add Rust development tools
158167
- **Default**: minimal tools plus extra compilers, development libraries, and packaging tools such as `rpmbuild` and `dpkg-dev`.
159168
- **Full (`full`)**: default tools plus language-specific development tools and advanced debugging or profiling utilities.
160169

170+
On EL systems, the default build toolset installs explicit PostgreSQL development/server packages for the stable active majors. Use `--beta` when you also need the current beta major.
171+
161172

162173
## build rust
163174

@@ -166,10 +177,16 @@ Install the Rust toolchain required by Rust-based extensions.
166177
```bash
167178
pig build rust # install with confirmation
168179
pig build rust -y # force reinstall Rust toolchain
180+
pig build rust -m # use rsproxy.cn and Cargo mirror config
169181
```
170182

171183
**Installed components:** Rust compiler (`rustc`), Cargo, Rust standard library, and development tools.
172184

185+
**Options:**
186+
187+
- `-y|--yes`: force Rust reinstallation even if Cargo already exists.
188+
- `-m|--mirror`: download `rustup` from the China mirror and write `~/.cargo/config.toml` for `rsproxy.cn`.
189+
173190

174191
## build pgrx
175192

@@ -180,10 +197,17 @@ pig build pgrx # install latest stable version (0.19.1)
180197
pig build pgrx -v 0.19.1 # install a specific pgrx version
181198
pig build pgrx --pg 18,17,16 # initialize pgrx for selected PG versions
182199
pig build pgrx --pg init # run cargo pgrx init without PG arguments
200+
pig build pgrx -b # include beta PostgreSQL pg_config in auto-detect
183201
```
184202

185203
**Prerequisites:** Rust toolchain and PostgreSQL development headers must be installed first.
186204

205+
**Options:**
206+
207+
- `-v|--pgrx`: cargo-pgrx version to install.
208+
- `--pg`: comma-separated PostgreSQL majors, `init` for no PostgreSQL arguments, or empty for auto-detection.
209+
- `-b|--beta`: include the current beta major during auto-detection.
210+
187211

188212
## build proxy
189213

@@ -215,11 +239,13 @@ Some source packages do not map directly to extension names, so `pig build get`
215239
```bash
216240
pig build get pdu # download pdu-3.0.25.12.tar.gz
217241
pig build get pgdog # download pgdog-0.1.32.tar.gz
218-
pig build get pgedge # download both PostgreSQL and spock sources
242+
pig build get pgedge-17 # download PostgreSQL 17 plus pgEdge suite sources
243+
pig build get babelfish-18 # download Babelfish PG18 source bundle
244+
pig build get orioledb-16 # download OrioleDB plus PG16 patch bundle
219245
pig build get onesparse # download onesparse, graphblas, and lagraph
220246
```
221247

222-
Common special source aliases include: `babelfishpg` / `babelfish`, `agensgraph` / `agentsgraph`, `oriolepg` / `orioledb`, `cloudberry`, `pgedge`, `pdu`, `pgdog`, `rdkit`, `onesparse`, and `libfepgutils`.
248+
Common special source aliases include: `babelfish` / `babelfish-17` / `babelfish-18`, `ivorysql`, `orioledb` / `orioledb-16` / `orioledb-17` / `orioledb-18`, `cloudberry` / `cloudberry-backup` / `cloudberry-pxf`, `pgedge` / `pgedge-15` / `pgedge-16` / `pgedge-17` / `pgedge-18`, `polardb`, `polarstore`, `zlog`, `pdu`, `pgdog`, `rdkit`, `onesparse`, `libpgfeutils`, and `libfq`.
223249

224250

225251
## build dep
@@ -264,6 +290,7 @@ pig build pkg citus pgvector # build multiple extensions
264290
pig build pkg citus --pg 17,16 # build for multiple PG versions
265291
pig build pkg citus -s # include debug symbols
266292
pig build pkg citus -m # prefer the pigsty.cc China mirror for sources
293+
pig build pkg cloudberry # build cloudberry, backup, and pxf in order
267294
```
268295

269296
**Options:**
@@ -272,6 +299,8 @@ pig build pkg citus -m # prefer the pigsty.cc China mirror for sources
272299
- `-s|--symbol`: build debug symbol packages (RPM only).
273300
- `-m|--mirror`: prefer the `pigsty.cc` mirror when downloading source files.
274301

302+
`pig build pkg cloudberry` is a suite workflow: it downloads the full Cloudberry source bundle, builds the core package first, installs the local artifact, then builds `cloudberry-backup` and `cloudberry-pxf`.
303+
275304

276305
## Common Workflows
277306

@@ -373,16 +402,16 @@ cargo pgrx init
373402

374403
### Common Extensions to Build
375404

376-
| Extension | Type | Build Time | Complexity | Special Requirements |
377-
|:---|:---:|:---|:---|:---|
378-
| pg_repack | C | Fast | Simple | None |
379-
| pg_partman | SQL/PLPGSQL | Fast | Simple | None |
380-
| citus | C | Medium | Medium | None |
381-
| timescaledb | C | Slow | Complex | CMake |
382-
| postgis | C | Very slow | Complex | GDAL, GEOS, Proj |
383-
| pg_duckdb | C++ | Medium | Medium | C++17 compiler |
384-
| pgroonga | C | Medium | Medium | Groonga libraries |
385-
| pgvector | C | Fast | Simple | None |
386-
| plpython3 | C | Medium | Medium | Python development |
387-
| pgrx extensions | Rust | Slow | Complex | Rust, PGRX |
405+
| Extension | Type | Build Time | Complexity | Special Requirements |
406+
|:----------------|:-----------:|:-----------|:-----------|:---------------------|
407+
| pg_repack | C | Fast | Simple | None |
408+
| pg_partman | SQL/PLPGSQL | Fast | Simple | None |
409+
| citus | C | Medium | Medium | None |
410+
| timescaledb | C | Slow | Complex | CMake |
411+
| postgis | C | Very slow | Complex | GDAL, GEOS, Proj |
412+
| pg_duckdb | C++ | Medium | Medium | C++17 compiler |
413+
| pgroonga | C | Medium | Medium | Groonga libraries |
414+
| pgvector | C | Fast | Simple | None |
415+
| plpython3 | C | Medium | Medium | Python development |
416+
| pgrx extensions | Rust | Slow | Complex | Rust, PGRX |
388417
{.full-width}

content/pig/cmd/build.zh.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ pig build - Build Postgres Extension
1313
Environment Setup:
1414
pig build spec # init build spec and directory (~ext)
1515
pig build repo # init build repo (=repo set -ru)
16+
pig build repo --beta # init build repo with PostgreSQL beta repo
1617
pig build tool [mini|full|...] # init build toolset
17-
pig build rust [-y] # install Rust toolchain
18-
pig build pgrx [-v <ver>] # install & init pgrx (0.19.1)
18+
pig build rust [-y] [-m] # install Rust toolchain
19+
pig build pgrx [-v <ver>] [-b] # install & init pgrx (0.19.1)
1920
pig build proxy [id@host:port ] # init build proxy (optional)
2021

2122
Package Building:
@@ -134,10 +135,17 @@ pig build spec -m # 优先使用 pigsty.cc 中国镜像
134135

135136
```bash
136137
pig build repo # 等同于:pig repo set -ru
138+
pig build repo -m # 使用镜像/代理路径添加 PostgreSQL 仓库
139+
pig build repo -b # 包含 PostgreSQL beta 仓库
137140
```
138141

139142
**功能:**`pig repo set -ru` 初始化构建所需仓库:移除旧仓库、添加所需仓库并更新包缓存。
140143

144+
**选项:**
145+
146+
- `-m|--mirror`:对 PostgreSQL 仓库使用 Pigsty 镜像/代理路径
147+
- `-b|--beta`:包含 PostgreSQL beta 仓库模块,当前用于 PG19 beta 构建
148+
141149

142150
## build tool
143151

@@ -148,6 +156,7 @@ pig build tool # 安装默认工具集
148156
pig build tool mini # 最小工具集
149157
pig build tool full # 完整工具集
150158
pig build tool rust # 添加 Rust 开发工具
159+
pig build tool -b # 包含 PostgreSQL beta 构建包
151160
```
152161

153162
**工具包:**
@@ -156,6 +165,8 @@ pig build tool rust # 添加 Rust 开发工具
156165
- **默认:** 所有最小工具、额外编译器(g++、clang++)、开发库、打包工具(rpmbuild、dpkg-dev)
157166
- **完整(`full`):** 所有默认工具、语言特定工具(Python、Perl、Ruby 开发)、高级调试工具、性能分析工具
158167

168+
在 EL 系统上,默认工具集会安装稳定活跃 PostgreSQL 主版本对应的显式 devel/server 包;需要当前 beta 主版本时使用 `--beta`
169+
159170

160171
## build rust
161172

@@ -164,10 +175,16 @@ pig build tool rust # 添加 Rust 开发工具
164175
```bash
165176
pig build rust # 带确认安装
166177
pig build rust -y # 强制重新安装 Rust 工具链
178+
pig build rust -m # 使用 rsproxy.cn 与 Cargo 镜像配置
167179
```
168180

169181
**安装内容:** Rust 编译器(rustc)、Cargo 包管理器、Rust 标准库、开发工具。
170182

183+
**选项:**
184+
185+
- `-y|--yes`:即使 Cargo 已存在也强制重新安装 Rust
186+
- `-m|--mirror`:从中国镜像下载 `rustup`,并写入面向 `rsproxy.cn``~/.cargo/config.toml`
187+
171188

172189
## build pgrx
173190

@@ -178,10 +195,17 @@ pig build pgrx # 安装最新稳定版 (0.19.1)
178195
pig build pgrx -v 0.19.1 # 安装特定版本
179196
pig build pgrx --pg 18,17,16 # 为指定 PG 版本初始化 pgrx
180197
pig build pgrx --pg init # 只执行 cargo pgrx init,不传 PG 参数
198+
pig build pgrx -b # 自动探测时包含 beta PostgreSQL pg_config
181199
```
182200

183201
**前提条件:** 必须先安装 Rust 工具链、PostgreSQL 开发头文件。
184202

203+
**选项:**
204+
205+
- `-v|--pgrx`:要安装的 cargo-pgrx 版本
206+
- `--pg`:逗号分隔的 PostgreSQL 主版本,`init` 表示不传 PostgreSQL 参数,留空则自动探测
207+
- `-b|--beta`:自动探测时包含当前 beta 主版本
208+
185209

186210
## build proxy
187211

@@ -213,11 +237,13 @@ pig build get citus -m # 优先使用 pigsty.cc 中国镜像
213237
```bash
214238
pig build get pdu # 下载 pdu-3.0.25.12.tar.gz
215239
pig build get pgdog # 下载 pgdog-0.1.32.tar.gz
216-
pig build get pgedge # 同时下载 PostgreSQL 与 spock 源码
240+
pig build get pgedge-17 # 下载 PostgreSQL 17 与 pgEdge 套件源码
241+
pig build get babelfish-18 # 下载 Babelfish PG18 源码包
242+
pig build get orioledb-16 # 下载 OrioleDB 与 PG16 patch bundle
217243
pig build get onesparse # 同时下载 onesparse、graphblas、lagraph
218244
```
219245

220-
当前常见的特殊源码 alias 包括:`babelfishpg` / `babelfish``agensgraph` / `agentsgraph``oriolepg` / `orioledb``cloudberry``pgedge``pdu``pgdog``rdkit``onesparse``libfepgutils`
246+
当前常见的特殊源码 alias 包括:`babelfish` / `babelfish-17` / `babelfish-18``ivorysql``orioledb` / `orioledb-16` / `orioledb-17` / `orioledb-18``cloudberry` / `cloudberry-backup` / `cloudberry-pxf``pgedge` / `pgedge-15` / `pgedge-16` / `pgedge-17` / `pgedge-18``polardb``polarstore``zlog``pdu``pgdog``rdkit``onesparse``libpgfeutils``libfq`
221247

222248

223249
## build dep
@@ -262,6 +288,7 @@ pig build pkg citus pgvector # 构建多个
262288
pig build pkg citus --pg 17,16 # 为多个 PG 版本
263289
pig build pkg citus -s # 包含调试符号
264290
pig build pkg citus -m # 优先使用 pigsty.cc 中国镜像下载源码
291+
pig build pkg cloudberry # 按顺序构建 cloudberry、backup、pxf
265292
```
266293

267294
**选项:**
@@ -270,6 +297,8 @@ pig build pkg citus -m # 优先使用 pigsty.cc 中国镜像下载源
270297
- `-s|--symbol`:构建调试符号包(仅 RPM)
271298
- `-m|--mirror`:下载源码时优先使用 `pigsty.cc` 镜像
272299

300+
`pig build pkg cloudberry` 是套件构建流程:先下载完整 Cloudberry 源码包,构建并安装本地核心产物,然后继续构建 `cloudberry-backup``cloudberry-pxf`
301+
273302

274303
## 常见工作流
275304

content/pig/cmd/ext.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,14 @@ pig ext update # no-op: explicit targets are required
227227
pig ext update pg_duckdb # update one extension
228228
pig ext update postgis timescaledb # update multiple extensions
229229
pig ext update pg_duckdb -y # auto-confirm update
230+
pig ext update pg_duckdb -m # refresh catalog from mirror first
230231
```
231232

232233
**Options:**
233234

234235
- `-v|--version`: specify PG major version
235236
- `-y|--yes`: auto-confirm update
237+
- `-m|--mirror`: reload the extension catalog from the `pigsty.cc` mirror before updating
236238

237239

238240
## ext import
@@ -260,6 +262,7 @@ Link a selected PG version into the system PATH.
260262
pig ext link 18 # link PG 18 to PATH
261263
pig ext link 16 # link PG 16 to /usr/pgsql
262264
pig ext link /usr/pgsql-16 # link from a selected path to /usr/pgsql
265+
pig ext link polar # link PolarDB 17 from /usr/polar-17
263266
pig ext link null # remove current PostgreSQL link
264267
pig ext link none # null / none / nil / nop / no all remove the link
265268
```

0 commit comments

Comments
 (0)