Skip to content

Commit 40c19e3

Browse files
committed
update pig rpm deb infra pkg release
1 parent 4c7b8c5 commit 40c19e3

File tree

19 files changed

+209
-124
lines changed

19 files changed

+209
-124
lines changed

content/docs/pg_exporter/release.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ title: Release Notes
33
weight: 5660
44
---
55

6-
The latest stable version of `pg_exporter` is [v1.1.2](https://github.com/pgsty/pg_exporter/releases/tag/v1.1.2)
6+
The latest stable version of `pg_exporter` is [v1.2.0](https://github.com/pgsty/pg_exporter/releases/tag/v1.2.0)
77

88
| Version | Date | Summary | GitHub |
99
|:---------------:|:----------:|---------------------------------------------------------|:------------------------------------------------------------------:|
10+
| [v1.2.0](#v120) | 2026-02-12 | various bug fix, PG9.x legacy support | [v1.2.0](https://github.com/pgsty/pg_exporter/releases/tag/v1.2.0) |
1011
| [v1.1.2](#v112) | 2026-01-16 | fix pg_timeline conf issue, build with latest deps | [v1.1.2](https://github.com/pgsty/pg_exporter/releases/tag/v1.1.2) |
1112
| [v1.1.1](#v111) | 2025-12-30 | New pg_timeline collector, pg_sub_16 branch, bug fixes | [v1.1.1](https://github.com/pgsty/pg_exporter/releases/tag/v1.1.1) |
1213
| [v1.1.0](#v110) | 2025-12-15 | Update default metrics collectors, bump to go 1.25.5 | [v1.1.0](https://github.com/pgsty/pg_exporter/releases/tag/v1.1.0) |
@@ -36,6 +37,47 @@ The latest stable version of `pg_exporter` is [v1.1.2](https://github.com/pgsty/
3637
| [v0.0.1](#v001) | 2019-12-06 | Initial release with PgBouncer mode | [v0.0.1](https://github.com/pgsty/pg_exporter/releases/tag/v0.0.1) |
3738

3839

40+
## v1.2.0
41+
42+
`v1.2.0` is a stability-and-compatibility focused minor release across startup flow, hot reload, health probing, config validation, and legacy support.
43+
44+
**New Features:**
45+
46+
- Add robust hot reload workflow: support platform-specific reload signals (`SIGHUP` / `SIGUSR1`) and strengthen `POST /reload` to refresh configs and query plans without process restart
47+
- Switch startup to non-blocking mode: HTTP endpoints come up first even when target precheck fails, making recovery and monitoring integration smoother
48+
- Add PostgreSQL 9.1-9.6 legacy config bundle: provide `legacy/` configs and a `make conf9` target for easier onboarding of EOL PostgreSQL versions
49+
- Rework health probing architecture: use cached health snapshots with periodic probes for more consistent role-based health endpoints and smoother reload behavior
50+
- Improve release engineering baseline: run `go test` and `go vet` in release workflows and bump build toolchain to Go 1.26.0
51+
52+
**Bug Fixes:**
53+
54+
- Fix multiple config parsing edge cases: reject malformed metrics entries, return explicit errors when config dirs fail to load valid YAML, and harden runtime fallbacks
55+
- Fix CLI bool flag parsing to correctly handle `--flag=false` style arguments
56+
- Fix `/explain` output/rendering behavior by adjusting content type handling and using safer template rendering
57+
- Fix predicate query and PG URL handling details: better BOOL/BOOLEAN predicate support, safer row lifecycle handling, and improved `dbname` query-parameter parsing/redaction
58+
- Fix resource cleanup when auto-discovered targets are removed by closing dropped server connections asynchronously
59+
- Fix metric/label validation details including const-label conflict checks, scaled default-value handling, and Prometheus naming/rule checks
60+
61+
**Checksums**
62+
63+
```bash
64+
26e7a052e730b412bbbe5f49846f951b89650f1f95c2466d5d486923f0825f64 pg-exporter_1.2.0-1_amd64.deb
65+
4ec219135c49708d010af7b8a7553b8008f630574e1d4cfc7642fbf951eefafe pg-exporter_1.2.0-1_arm64.deb
66+
5b2cc00e2c3e2ffd9eb0ab1a4f5e937dd68f3a69a14423a74d4de3d7cf29283e pg-exporter_1.2.0-1_ppc64le.deb
67+
d536d41a92e8aa85ae3935715d1bf0463208b1e614eae73543f1472ca8a7e0d4 pg_exporter-1.2.0-1.aarch64.rpm
68+
b7a1daa225f8ca4de6d227e6004330589295d924accd221892ebe14f191fe35c pg_exporter-1.2.0-1.ppc64le.rpm
69+
28bf7d85862510675c64ff5181d216c6a068a23ffa56dc4bb9e6b82165ff99b5 pg_exporter-1.2.0-1.x86_64.rpm
70+
51c3b3d18089d888a54a6b3e7ecb0620dc0da04c81471a0b7aaa88c1677ddb8c pg_exporter-1.2.0.darwin-amd64.tar.gz
71+
3ba1c7adea9c926afd3054ba18cc43e665e420a495bfcfd2248242c49a67b077 pg_exporter-1.2.0.darwin-arm64.tar.gz
72+
9e1ec6c15e6b2aaadbe27a27053ee1ec289bdd012c19ca6371de738fa5f8843e pg_exporter-1.2.0.linux-amd64.tar.gz
73+
9e18849693ccda313979db0a230cb81acfe4199364feb6ce3e72d1a89fbfb809 pg_exporter-1.2.0.linux-arm64.tar.gz
74+
6e28489685d0bd1fdabcb71474f64f559ade199b871666954323bae9dc01465f pg_exporter-1.2.0.linux-ppc64le.tar.gz
75+
9e9beac619fe2c614a77bc3334bc4b80df9db355bf95845eb4b11674ddad52d9 pg_exporter-1.2.0.windows-amd64.tar.gz
76+
```
77+
78+
https://github.com/pgsty/pg_exporter/releases/tag/v1.2.0
79+
80+
3981
## v1.1.2
4082

4183
Minor release fixing pg_timeline configuration issue and building with latest go deps

content/docs/pig/_index.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ PIG is a command-line tool specifically designed for installing, managing, and b
1212
PIG is not a reinvented wheel, but rather a **PiggyBack** - a high-level abstraction layer that leverages existing Linux distribution package managers (`apt`/`dnf`).
1313
It abstracts away the differences between operating systems, chip architectures, and PG major versions, allowing you to install and manage PG kernels and 444+ extensions with just a few simple commands.
1414

15-
PIG is also an **Agentic Native CLI**: it supports global `-o|--output` structured output (`yaml` / `json` / `json-pretty`), and provides a **Capability Map** and **Command Schema** for AI/automation. For example:
16-
17-
```bash
18-
pig --help -o yaml # capability map
19-
pig ext --help -o json # command schema (params/flags/risk/parallelism/confirmation levels)
20-
```
15+
PIG is also automation-friendly by design: consistent parameter styles, clear error messages, and safe guards like `--dry-run` for high-risk operations.
2116

2217
Please note: for extension installation, **pig is not a mandatory component**. You can still use apt/dnf package managers to directly access the [**Pigsty PGSQL**](/docs/repo/pgsql/) repository.
2318

content/docs/pig/build.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Commands:
2121
pgrx Install pgrx
2222
pkg Complete build pipeline: get, dep, ext
2323
proxy Init build proxy
24-
repo Init build repo
24+
repo Init build repo (=repo set, with remove+update)
2525
rust Install rust
2626
spec Init building spec repo
2727
tool Init build tools
@@ -68,7 +68,7 @@ pig build repo # Setup repositories
6868
pig build tool # Install build tools
6969

7070
# Install Rust (for Rust extensions)
71-
pig build rust -y # Install Rust
71+
pig build rust -y # Force reinstall Rust (default does not reinstall)
7272
pig build pgrx # Install PGRX framework
7373

7474
# Build extensions
@@ -91,7 +91,7 @@ pig build spec -f # Force overwrite existing files
9191
Setup repositories required for building.
9292

9393
```bash
94-
pig build repo # Setup repositories
94+
pig build repo # Equivalent to: pig repo set (internally remove+update)
9595
```
9696

9797

@@ -111,7 +111,7 @@ Install Rust toolchain (for building Rust extensions).
111111

112112
```bash
113113
pig build rust # Install Rust
114-
pig build rust -y # Auto-confirm
114+
pig build rust -y # Force reinstall Rust toolchain
115115
```
116116

117117

@@ -234,7 +234,7 @@ sudo dpkg -i ~/pg_partman*.deb # Debian
234234
# 1. Setup Rust environment
235235
pig build spec
236236
pig build tool
237-
pig build rust -y
237+
pig build rust # add -y only if you need to force reinstall
238238
pig build pgrx
239239

240240
# 2. Build Rust extension
@@ -306,4 +306,3 @@ cargo install cargo-pgrx --force
306306
# Reinitialize PGRX
307307
cargo pgrx init
308308
```
309-

content/docs/pig/cmd.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,13 @@ Flags:
6161
-h, --help help for pig
6262
-H, --home string Pigsty home path
6363
-i, --inventory string config inventory path
64-
-o, --output string output format: text, yaml, json, json-pretty
64+
-t, --toggle placeholder flag shown in help output
6565
--log-level string log level: debug, info, warn, error, fatal, panic (default "info")
6666
--log-path string log file path, terminal by default
6767

6868
Use "pig [command] --help" for more information about a command.
6969
```
7070

71-
## Agentic Native CLI
72-
73-
`pig` supports structured output and capability discovery for AI/automation:
74-
75-
```bash
76-
pig --help -o yaml # capability map
77-
pig ext --help -o json # command schema (params/flags/metadata)
78-
pig ext list -o json # structured result: success / code / message / data
79-
```
80-
81-
Note: `-o json-pretty` outputs indented JSON. Structured output currently mainly covers `ext` / `repo` / `pitr` and `help`; other commands remain text output.
82-
83-
8471
## pig repo
8572

8673
Manage APT/YUM repositories for PostgreSQL packages. See [`pig repo`](/docs/pig/repo/) for details.
@@ -129,7 +116,7 @@ Build PostgreSQL extensions from source. See [`pig build`](/docs/pig/build/) for
129116
pig build spec # initialize build specs
130117
pig build repo # setup repositories
131118
pig build tool # install build tools
132-
pig build rust -y # install Rust (for Rust extensions)
119+
pig build rust -y # force reinstall Rust (default does not reinstall)
133120
pig build pgrx # install PGRX framework
134121

135122
# build extensions
@@ -190,7 +177,7 @@ pig pb info # show backup info
190177
pig pb ls # list all backups
191178
pig pb backup # create backup
192179
pig pb backup full # full backup
193-
pig pb restore # restore to latest
180+
pig pb restore -d # restore to latest
194181
pig pb restore -t "2025-01-01" # restore to specific time
195182
pig pb log tail # real-time log viewing
196183
```
@@ -204,8 +191,7 @@ Orchestrated Point-In-Time Recovery. See [`pig pitr`](/docs/pig/pitr/) for detai
204191
pig pitr -d # recover to latest (most common)
205192
pig pitr -t "2025-01-01 12:00" # recover to specific time
206193
pig pitr -I # recover to backup consistency point
207-
pig pitr -d --plan # show execution plan
208-
pig pitr -d --dry-run # alias for --plan
194+
pig pitr -d --dry-run # show execution plan without running
209195
pig pitr -d -y # skip confirmation (for automation)
210196
pig pitr -d --skip-patroni # skip Patroni management
211197
pig pitr -d --no-restart # don't auto-start PostgreSQL after restore

content/docs/pig/ext.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ List or search extensions.
8181
```bash
8282
pig ext list # List all extensions
8383
pig ext list duck # Search for "duck" extensions
84-
pig ext list vector ai # Search multiple keywords
8584
pig ext list -v 17 # Filter by PG version
8685
pig ext ls olap # List OLAP category extensions
8786
pig ext ls gis -v 16 # List GIS extensions for PG 16
@@ -149,17 +148,15 @@ pig install pg_duckdb -v 17 -y
149148
**Options:**
150149
- `-v|--version`: Specify PG major version
151150
- `-y|--yes`: Auto-confirm installation
152-
- `-n|--no-translation`: Disable alias translation
153151

154152

155153
## ext rm
156154

157-
Remove extensions. Also available via alias `pig remove`.
155+
Remove extensions.
158156

159157
```bash
160158
pig ext rm pg_duckdb # Remove pg_duckdb
161159
pig ext rm pg_duckdb -v 17 # Remove for PG 17
162-
pig remove pg_duckdb # Using alias
163160
```
164161

165162

@@ -223,7 +220,7 @@ To install PostgreSQL extensions, you'll have to add the [**repo**](/docs/pig/re
223220

224221
```bash
225222
pig repo add pgdg pigsty -u # gentle way to add pgdg and pigsty repo
226-
pig repo set -u # brute way to remove and add all required repos
223+
pig repo set # brute way to remove and add all required repos
227224
```
228225

229226
Then you can search and install PostgreSQL extensions:

content/docs/pig/install.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ curl -fsSL https://repo.pigsty.cc/pig | bash -s 1.0.0
4747

4848
## Download from Release Page
4949

50-
You can also download `pig` installation packages (`RPM`/`DEB`/tarball) directly from the Pigsty repository: [GitHub Latest Release Page](https://github.com/pgsty/pig/releases/latest)
50+
You can also download `pig` installation packages (`RPM`/`DEB`/tarball) directly from the Pigsty repository: [GitHub v1.0.0 Stable Release Page](https://github.com/pgsty/pig/releases/tag/v1.0.0)
5151

5252
```
5353
latest
@@ -135,4 +135,3 @@ go get -u; go build
135135
```
136136

137137
All RPM/DEB packages are automatically built through GitHub CI/CD workflow using goreleaser.
138-

content/docs/pig/intro.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,9 @@ Want to supercharge your Postgres and escape the hassle? Visit the [PIG official
2323
turning your local Postgres database into an all-capable multi-modal data platform with one click.
2424
If [Postgres's future is unmatched extensibility](https://medium.com/@fengruohang/postgres-is-eating-the-database-world-157c204dcfc4), then Pig is the magic lamp that helps you unlock it. After all, no one ever complains about "too many extensions".
2525

26-
## Agentic Native CLI
26+
## Automation-Friendly
2727

28-
PIG is designed for AI agents and automation. The global `-o|--output` switch enables structured output (`yaml` / `json` / `json-pretty`),
29-
and Pig also provides the **Capability Map** and **Command Schema** needed for capability discovery.
30-
31-
```bash
32-
pig --help -o yaml # capability map
33-
pig ext --help -o json # command schema
34-
pig repo list -o yaml # structured result: success / code / message / data
35-
```
28+
PIG's command system is automation-ready out of the box: consistent argument conventions, stable output behavior, and `--dry-run` or confirmation flows for high-risk operations to reduce mistakes.
3629

3730

3831
> [ANNOUNCE pig: The Postgres Extension Wizard](https://www.postgresql.org/about/news/announce-pig-the-postgres-extension-wizard-2988/)

content/docs/pig/pb.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Backup Commands (Primary Only):
2727
pig pb backup incr incremental backup
2828

2929
Restore Commands:
30-
pig pb restore -d restore to latest (default)
30+
pig pb restore -d restore to latest (end of WAL)
3131
pig pb restore -I restore to backup consistency point
3232
pig pb restore -t <time> restore to specific time
3333
pig pb restore -n <name> restore to named restore point
@@ -97,7 +97,7 @@ Log Commands:
9797
```bash
9898
# View backup info
9999
pig pb info # Show all backup info
100-
pig pb info -o json # JSON format output
100+
pig pb info --raw -o json # Raw JSON output
101101
pig pb ls # List all backups
102102
pig pb ls repo # List configured repos
103103
pig pb ls stanza # List all stanzas
@@ -108,8 +108,8 @@ pig pb backup full # Full backup
108108
pig pb backup diff # Differential backup
109109
pig pb backup incr # Incremental backup
110110

111-
# Restore (PITR)
112-
pig pb restore # Restore to latest (end of WAL)
111+
# Restore (PITR, at least one recovery target is required)
112+
pig pb restore -d # Restore to latest (end of WAL)
113113
pig pb restore -I # Restore to backup consistency point
114114
pig pb restore -t "2025-01-01 12:00:00+08" # Restore to specific time
115115
pig pb restore -n savepoint # Restore to named restore point
@@ -166,15 +166,16 @@ Show detailed backup repository info including all backup sets and WAL archive s
166166

167167
```bash
168168
pig pb info # Show all backup info
169-
pig pb info -o json # JSON format output
169+
pig pb info --raw -o json # Raw JSON output
170170
pig pb info --set 20250101-120000F # Show specific backup set details
171171
```
172172

173173
**Options:**
174174

175175
| Option | Short | Description |
176176
|:---|:---|:---|
177-
| `--output` | `-o` | Output format: text, json |
177+
| `--raw` | `-R` | Raw output mode (pass through pgBackRest output) |
178+
| `--output` | `-o` | Output format: text, json (only in `--raw` mode) |
178179
| `--set` | | Show specific backup set details |
179180
{.full-width}
180181

@@ -272,10 +273,10 @@ repo1-retention-archive=2 # WAL archive retention policy
272273
### pb restore
273274

274275
Restore from backup with point-in-time recovery (PITR) support.
276+
At least one recovery target (`-d/-I/-t/-n/-l/-x`) must be specified. Without parameters, help is shown.
275277

276278
```bash
277279
# Recovery target (mutually exclusive)
278-
pig pb restore # Restore to latest (default)
279280
pig pb restore -d # Restore to latest (explicit)
280281
pig pb restore -I # Restore to backup consistency point
281282
pig pb restore -t "2025-01-01 12:00:00+08" # Restore to specific time

content/docs/pig/pg.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Log Commands:
3838
pig pg log tail <logfile> tail -f log file
3939
pig pg log cat <logfile> cat log file
4040
pig pg log less <logfile> less log file
41-
pig pg log grep <logfile> <pat> grep log file
4241

4342
Service Management (via systemctl):
4443
pig pg svc start start postgres service
@@ -92,9 +91,10 @@ Service Management (via systemctl):
9291
| `pg log tail` | `t, f` | Real-time log viewing | tail -f |
9392
| `pg log cat` | `c` | Output log content | |
9493
| `pg log less` | `vi, v` | View with less | |
95-
| `pg log grep` | `g, search` | Search logs | |
9694
{.full-width}
9795

96+
> Known issue in `v1.0.0`: `pig pg log grep` has a parameter conflict and does not work. Use `pig pg log cat | grep PATTERN` as a workaround.
97+
9898
**Service Subcommand** (`pg svc`):
9999

100100
| Command | Alias | Description |
@@ -131,8 +131,8 @@ pig pg repack mydb # Online repack database
131131

132132
# Log viewing
133133
pig pg log tail # Real-time view latest log
134-
pig pg log grep ERROR # Search error logs
135134
pig pg log list --log-dir /var/log/pg # Custom log directory
135+
pig pg log cat | grep ERROR # Filter logs in shell
136136
```
137137

138138

@@ -562,26 +562,6 @@ pig pg log less postgresql.csv # Open specific log file
562562
```
563563

564564

565-
### pg log grep
566-
567-
Search log files.
568-
569-
```bash
570-
pig pg log grep ERROR # Search for ERROR lines
571-
pig pg log grep -i error # Case insensitive
572-
pig pg log grep -C 3 ERROR # Show 3 lines context
573-
pig pg log grep ERROR pg.csv # Search specific log file
574-
```
575-
576-
**Options:**
577-
578-
| Option | Short | Description |
579-
|:---|:---|:---|
580-
| `--ignore-case` | `-i` | Case insensitive |
581-
| `--context` | `-C` | Show N lines of context |
582-
{.full-width}
583-
584-
585565
## pg svc Subcommand
586566

587567
`pg svc` provides systemctl-based PostgreSQL service management:

0 commit comments

Comments
 (0)