Skip to content

Commit 436c6cb

Browse files
committed
update pig command
1 parent 65761a0 commit 436c6cb

File tree

15 files changed

+2011
-88
lines changed

15 files changed

+2011
-88
lines changed

content/docs/pig/_div_cmd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Command Reference
3-
weight: 5250
3+
weight: 99
44
sidebar_divider: true
55
toc_hide: false
66
---

content/docs/pig/build.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
2-
title: "CMD: pig build"
3-
linkTitle: "CMD: pig build"
2+
title: "pig build"
43
description: "Build PostgreSQL extensions from source with pig build subcommand"
5-
weight: 5300
4+
weight: 130
65
icon: fas fa-hammer
76
module: [PIG]
8-
categories: [Admin]
7+
categories: [Reference]
98
---
109

1110
The `pig build` command is a powerful tool that simplifies the entire workflow of building PostgreSQL extensions from source. It provides a complete build infrastructure setup, dependency management, and compilation environment for both standard and custom PostgreSQL extensions across different operating systems.

content/docs/pig/cmd.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "CMD: pig"
2+
title: "pig"
33
description: "pig CLI command reference overview"
4-
weight: 5260
4+
weight: 100
55
icon: fas fa-terminal
66
module: [PIG]
7-
categories: [Admin]
7+
categories: [Reference]
88
---
99

1010
The `pig` CLI provides comprehensive tools for managing PostgreSQL installations, extensions, repositories, and building extensions from source. Check command documentation with `pig help <command>`.
@@ -13,6 +13,9 @@ The `pig` CLI provides comprehensive tools for managing PostgreSQL installations
1313
- [**pig ext**](/docs/pig/ext/): Manage PostgreSQL extensions
1414
- [**pig build**](/docs/pig/build/): Build extensions from source
1515
- [**pig sty**](/docs/pig/sty/): Manage Pigsty installation
16+
- [**pig pg**](/docs/pig/pg/): Manage local PostgreSQL server
17+
- [**pig pt**](/docs/pig/pt/): Manage Patroni HA cluster
18+
- [**pig pb**](/docs/pig/pb/): Manage pgBackRest backup & recovery
1619

1720

1821
## Overview
@@ -127,3 +130,46 @@ pig sty conf # Generate configuration
127130
pig sty deploy # Run deployment playbook
128131
```
129132

133+
134+
## pig pg
135+
136+
Manage local PostgreSQL server. See [`pig pg`](/docs/pig/pg/) for details.
137+
138+
```bash
139+
pig pg init # Initialize data directory
140+
pig pg start # Start PostgreSQL
141+
pig pg stop # Stop PostgreSQL
142+
pig pg status # Check status
143+
pig pg psql mydb # Connect to database
144+
pig pg ps # Show current connections
145+
pig pg vacuum mydb # Vacuum database
146+
pig pg log tail # Real-time log viewing
147+
```
148+
149+
150+
## pig pt
151+
152+
Manage Patroni HA cluster. See [`pig pt`](/docs/pig/pt/) for details.
153+
154+
```bash
155+
pig pt list # List cluster members
156+
pig pt config # Show cluster config
157+
pig pt config ttl=60 # Modify cluster config
158+
pig pt status # Check service status
159+
pig pt log -f # Real-time log viewing
160+
```
161+
162+
163+
## pig pb
164+
165+
Manage pgBackRest backup & recovery. See [`pig pb`](/docs/pig/pb/) for details.
166+
167+
```bash
168+
pig pb info # Show backup info
169+
pig pb ls # List all backups
170+
pig pb backup # Create backup
171+
pig pb backup full # Full backup
172+
pig pb restore # Restore to latest
173+
pig pb restore -t "2025-01-01" # Restore to specific time
174+
pig pb log tail # Real-time log viewing
175+
```

content/docs/pig/ext.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
2-
title: "CMD: pig ext"
3-
linkTitle: "CMD: pig ext"
2+
title: "pig ext"
43
description: "Manage PostgreSQL extensions with pig ext subcommand"
5-
weight: 5270
4+
weight: 120
65
icon: fas fa-puzzle-piece
76
module: [PIG]
8-
categories: [Admin]
7+
categories: [Reference]
98
---
109

1110
The `pig ext` command is a comprehensive tool for managing PostgreSQL extensions.
@@ -47,13 +46,18 @@ List or search extensions.
4746
pig ext list # List all extensions
4847
pig ext list duck # Search for "duck" extensions
4948
pig ext list vector ai # Search multiple keywords
50-
pig ext list -c RAG # Filter by category
5149
pig ext list -v 17 # Filter by PG version
50+
pig ext ls olap # List OLAP category extensions
51+
pig ext ls gis -v 16 # List GIS extensions for PG 16
52+
pig ext ls rag # List RAG category extensions
5253
```
5354

55+
Category filter is achieved by specifying the category name directly as query parameter. Supported categories: `time`, `gis`, `rag`, `fts`, `olap`, `feat`, `lang`, `type`, `func`, `util`, `admin`, `stat`, `sec`, `fdw`, `sim`, `etl`.
56+
5457
**Options:**
55-
- `-c|--category`: Filter by category (TIME, GIS, RAG, FTS, OLAP, FEAT, LANG, TYPE, UTIL, FUNC, ADMIN, STAT, SEC, FDW, SIM, ETL)
58+
5659
- `-v|--version`: Filter by PG version
60+
- `--pkg`: Show package names instead of extension names, list leading extensions only
5761

5862

5963
## ext info

content/docs/pig/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Installation"
33
linkTitle: "Installation"
44
description: "How to download and install the pig package manager"
5-
weight: 5230
5+
weight: 30
66
icon: fas fa-download
77
module: [PIG]
88
categories: [Task]

content/docs/pig/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Introduction"
33
linkTitle: "Introduction"
44
description: "Why do we need yet another package manager? Especially for Postgres extensions?"
5-
weight: 5220
5+
weight: 20
66
icon: fas fa-lightbulb
77
module: [PIG]
88
categories: [Concept]

0 commit comments

Comments
 (0)