Skip to content

Design Notes

Design notes explain the decisions and proposals behind PIG. Each note gives its date, status, scope, alternatives, and supporting evidence. Proposals describe directions under discussion; implemented and released records explain work that has reached those stages.

For command syntax and usage, use the PIG documentation. For changes in each version, use the release notes.

Design Notes
PostgreSQL 19 Lifecycle Window and Default Major Decoupling extrepobuildsty
Require Explicit Kernel Aliases for Protected Package Removal extcatalogcli
Target PostgreSQL Versions for Category Aliases catalogextinstall
One Catalog Entry Count for the Website and CLI catalogextcli
One-command Xray Clients and Servers buildcliinstall
Install the Pigsty Repository Key Automatically reposty
Why PIG Builds Debug Packages by Default buildcli
Bootstrapping a Pigsty Controller as a Recoverable Transaction styrepoinstall
Catalog v2 Proposal: Immutable Typed Snapshots catalogrepoextcli
PIG 2.0 Product Direction clistycatalog
Let Patronictl Speak for Itself patronicli
A Bounded Grafana Client Instead of Dashboard Shell Scripts sty
Use the CMDB Pigsty Already Has inventorysty
Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory inventorysty
One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract clipostgrespgbackrestpitr
Why PIG Keeps the Cobra Command Layer Flat cli
The 70% Tuner: Defining the Boundary of pig pg tune postgres
Compile, Validate, Then Commit: The Native sty conf Pipeline styinventory
From Human-Friendly to Agent-Native: PIG's CLI Contract cli
  • PostgreSQL 19 Lifecycle Window and Default Major Decoupling

    By Ruohang Feng In Design

    Ruohang Fengextrepobuildsty

    PostgreSQL 19 Lifecycle Window and Default Major Decoupling

    Decision date: 2026-11-21 Status: Implemented (verified in source and local tests above v1.11.0; not yet published in a release). Current reference: pig ext, pig repo, pig build, pig sty, pig pg tune Scope: Active PostgreSQL major window, default …

    Decision date: 2026-11-21 Status: Implemented (verified in source and local tests above v1.11.0; not yet published in a release). Current reference: pig ext, pig repo, pig build, pig sty, pig pg tune Scope: Active PostgreSQL major window, default …

  • Require Explicit Kernel Aliases for Protected Package Removal

    By Ruohang Feng In Design

    Ruohang Fengextcatalogcli

    Require Explicit Kernel Aliases for Protected Package Removal

    Decision date: 2026-11-11 Status: Released in pig v1.11.0, from implementation commit a95f37f; the owner approved the package boundary, explicit aliases, and whole-request rejection on 2026-11-11. Current reference: pig ext rm Scope: Package …

    Decision date: 2026-11-11 Status: Released in pig v1.11.0, from implementation commit a95f37f; the owner approved the package boundary, explicit aliases, and whole-request rejection on 2026-11-11. Current reference: pig ext rm Scope: Package …

  • Target PostgreSQL Versions for Category Aliases

    By Ruohang Feng In Design

    Ruohang Fengcatalogextinstall

    Target PostgreSQL Versions for Category Aliases

    Decision date: 2026-11-06 Status: Implemented in source commit 7c069dc; released in v1.10.4. Current reference: pig ext category aliases Scope: Dynamic pgN-* and pgsql-* category aliases that resolve extension package groups. Decision Stable …

    Decision date: 2026-11-06 Status: Implemented in source commit 7c069dc; released in v1.10.4. Current reference: pig ext category aliases Scope: Dynamic pgN-* and pgsql-* category aliases that resolve extension package groups. Decision Stable …

  • One Catalog Entry Count for the Website and CLI

    By Ruohang Feng In Design

    Ruohang Fengcatalogextcli

    One Catalog Entry Count for the Website and CLI

    Decision date: 2026-10-16 Status: Released in pig v1.10.0. Current reference: pig ext catalog count Scope: Catalog totals and default listing membership; package installation and SQL activation rules remain defined by each entry. Decision Use the …

    Decision date: 2026-10-16 Status: Released in pig v1.10.0. Current reference: pig ext catalog count Scope: Catalog totals and default listing membership; package installation and SQL activation rules remain defined by each entry. Decision Use the …

  • One-command Xray Clients and Servers

    By Ruohang Feng In Design

    Ruohang Fengbuildcliinstall

    One-command Xray Clients and Servers

    Decision date: 2026-10-05 Status: Released in v1.9.0; the 2026-10-16 service-recognition refinement shipped in v1.10.0. Current reference: pig build, operations safety, and release history Scope: One-command Xray client and server setup; Linux …

    Decision date: 2026-10-05 Status: Released in v1.9.0; the 2026-10-16 service-recognition refinement shipped in v1.10.0. Current reference: pig build, operations safety, and release history Scope: One-command Xray client and server setup; Linux …

  • Install the Pigsty Repository Key Automatically

    By Ruohang Feng In Design

    Ruohang Fengreposty

    Install the Pigsty Repository Key Automatically

    Decision date: 2026-10-04 Status: Released in v1.9.0. The 2026-11-11 APT trust-reconciliation refinement is implemented in a95f37f, without a release claim. Current reference: pig repo Scope: Installing the existing embedded Pigsty public key during …

    Decision date: 2026-10-04 Status: Released in v1.9.0. The 2026-11-11 APT trust-reconciliation refinement is implemented in a95f37f, without a release claim. Current reference: pig repo Scope: Installing the existing embedded Pigsty public key during …

  • Why PIG Builds Debug Packages by Default

    By Ruohang Feng In Design

    Ruohang Fengbuildcli

    Why PIG Builds Debug Packages by Default

    Decision date: 2026-09-03 Status: Released in v1.8.1. Current reference: pig build Scope: Debug-package policy for pig build ext and pig build pkg; individual package recipes remain authoritative for their payload. Decision pig build ext and pig …

    Decision date: 2026-09-03 Status: Released in v1.8.1. Current reference: pig build Scope: Debug-package policy for pig build ext and pig build pkg; individual package recipes remain authoritative for their payload. Decision pig build ext and pig …

  • Bootstrapping a Pigsty Controller as a Recoverable Transaction

    By Ruohang Feng In Design

    Ruohang Fengstyrepoinstall

    Bootstrapping a Pigsty Controller as a Recoverable Transaction

    Decision date: 2026-08-14 Status: Implemented and released in pig v1.8.0. The 2026-11-11 offline-source refinement from a95f37f shipped in pig v1.11.0. Current reference: pig sty boot Scope: Preparing a Pigsty controller and its package sources; not …

    Decision date: 2026-08-14 Status: Implemented and released in pig v1.8.0. The 2026-11-11 offline-source refinement from a95f37f shipped in pig v1.11.0. Current reference: pig sty boot Scope: Preparing a Pigsty controller and its package sources; not …

  • Catalog v2 Proposal: Immutable Typed Snapshots

    By Ruohang Feng In Design

    Ruohang Fengcatalogrepoextcli

    Catalog v2 Proposal: Immutable Typed Snapshots

    Decision date: 2026-08-13 Status: Proposal; security mechanism, overlays, packaging, and path layout remain open. Current reference: pig ext and pig repo describe the v1 Catalog behavior. Scope: A candidate PIG 2.0 publication and consumption model …

    Decision date: 2026-08-13 Status: Proposal; security mechanism, overlays, packaging, and path layout remain open. Current reference: pig ext and pig repo describe the v1 Catalog behavior. Scope: A candidate PIG 2.0 publication and consumption model …

  • PIG 2.0 Product Direction

    By Ruohang Feng In Design

    Ruohang Fengclistycatalog

    PIG 2.0 Product Direction

    Decision date: 2026-08-13 Status: Proposal for review; not implemented. Current reference: PIG documentation and release history Scope: Candidate product boundaries and verification gates for a future PIG 2.0 / Pigsty 5.0 line. Decision The proposed …

    Decision date: 2026-08-13 Status: Proposal for review; not implemented. Current reference: PIG documentation and release history Scope: Candidate product boundaries and verification gates for a future PIG 2.0 / Pigsty 5.0 line. Decision The proposed …

  • Let Patronictl Speak for Itself

    By Ruohang Feng In Design

    Ruohang Fengpatronicli

    Let Patronictl Speak for Itself

    Decision date: 2026-07-21 Status: Implemented and released in pig v1.6.0. Current reference: pig pt Scope: Patronictl-backed cluster commands plus PIG-owned configuration selection, settings sugar, service, status, and log helpers. Decision pig pt …

    Decision date: 2026-07-21 Status: Implemented and released in pig v1.6.0. Current reference: pig pt Scope: Patronictl-backed cluster commands plus PIG-owned configuration selection, settings sugar, service, status, and log helpers. Decision pig pt …

  • A Bounded Grafana Client Instead of Dashboard Shell Scripts

    By Ruohang Feng In Design

    Ruohang Fengsty

    A Bounded Grafana Client Instead of Dashboard Shell Scripts

    Decision date: 2026-07-18 Status: Released in v1.6.0; dashboard schema v2 support followed in v1.6.2. Current reference: pig sty grafana Scope: Dashboard import, export, cleanup, and selected organization and user preferences. Decision PIG uses a …

    Decision date: 2026-07-18 Status: Released in v1.6.0; dashboard schema v2 support followed in v1.6.2. Current reference: pig sty grafana Scope: Dashboard import, export, cleanup, and selected organization and user preferences. Decision PIG uses a …

  • Use the CMDB Pigsty Already Has

    By Ruohang Feng In Design

    Ruohang Fenginventorysty

    Use the CMDB Pigsty Already Has

    Decision date: 2026-07-18 Status: Released in v1.6.0 as an experimental adapter. The earlier revision-store design is superseded. Current reference: pig inventory cmdb Scope: Exchanging declarations with Pigsty’s existing CMDB, not designing another …

    Decision date: 2026-07-18 Status: Released in v1.6.0 as an experimental adapter. The earlier revision-store design is superseded. Current reference: pig inventory cmdb Scope: Exchanging declarations with Pigsty’s existing CMDB, not designing another …

  • Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory

    By Ruohang Feng In Design

    Ruohang Fenginventorysty

    Edit the Declaration, Preserve the Document: Lossless Pigsty Inventory

    Decision date: 2026-07-18 Status: Implemented and released in pig v1.6.0; the 2026-10-16 to 2026-10-17 refinements shipped in pig v1.10.0. Latest refinement: The 2026-11-12 CMDB scalar fixes from f569d0d are Released in pig v1.11.0. Current …

    Decision date: 2026-07-18 Status: Implemented and released in pig v1.6.0; the 2026-10-16 to 2026-10-17 refinements shipped in pig v1.10.0. Latest refinement: The 2026-11-12 CMDB scalar fixes from f569d0d are Released in pig v1.11.0. Current …

  • One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract

    By Ruohang Feng In Design

    Ruohang Fengclipostgrespgbackrestpitr

    One Grammar for Dangerous Work: PIG's Operations CLI Safety Contract

    Decision date: 2026-07-02 Status: Released for pg, pb, pt, and pitr by v1.5.0; the 2026-08-29 do and build proxy refinements shipped in v1.8.1, and the 2026-10-16 to 2026-10-17 acceptance refinements shipped in v1.10.0. The 2026-11-10 removal and …

    Decision date: 2026-07-02 Status: Released for pg, pb, pt, and pitr by v1.5.0; the 2026-08-29 do and build proxy refinements shipped in v1.8.1, and the 2026-10-16 to 2026-10-17 acceptance refinements shipped in v1.10.0. The 2026-11-10 removal and …

  • Why PIG Keeps the Cobra Command Layer Flat

    By Ruohang Feng In Design

    Ruohang Fengcli

    Why PIG Keeps the Cobra Command Layer Flat

    Decision date: 2026-06-30 Status: Implemented; the repository uses this layout for new commands. Current reference: pig command overview and the source repository Scope: Go source ownership and command registration, not the public command taxonomy …

    Decision date: 2026-06-30 Status: Implemented; the repository uses this layout for new commands. Current reference: pig command overview and the source repository Scope: Go source ownership and command registration, not the public command taxonomy …

  • The 70% Tuner: Defining the Boundary of pig pg tune

    By Ruohang Feng In Design

    Ruohang Fengpostgres

    The 70% Tuner: Defining the Boundary of pig pg tune

    Decision date: 2026-03-21 Status: Released in pig v1.3.2, following implementation on 2026-03-23. Current reference: pig pg tune Scope: Generate a starting configuration from hardware, PostgreSQL version, and workload profile. Decision pig pg tune …

    Decision date: 2026-03-21 Status: Released in pig v1.3.2, following implementation on 2026-03-23. Current reference: pig pg tune Scope: Generate a starting configuration from hardware, PostgreSQL version, and workload profile. Decision pig pg tune …

  • Compile, Validate, Then Commit: The Native sty conf Pipeline

    By Ruohang Feng In Design

    Ruohang Fengstyinventory

    Compile, Validate, Then Commit: The Native sty conf Pipeline

    Decision date: 2026-02-18; the production contract was finalized on 2026-08-14. Status: Native pipeline released in pig v1.8.0; ordered template lookup is implemented in ba771a5 and the 2026-11-11 region refinement is implemented in a95f37f; both …

    Decision date: 2026-02-18; the production contract was finalized on 2026-08-14. Status: Native pipeline released in pig v1.8.0; ordered template lookup is implemented in ba771a5 and the 2026-11-11 region refinement is implemented in a95f37f; both …

  • From Human-Friendly to Agent-Native: PIG's CLI Contract

    By Ruohang Feng In Design

    Ruohang Fengcli

    From Human-Friendly to Agent-Native: PIG's CLI Contract

    Decision date: 2026-02-12 Status: Released in pig v1.1.0 and refined in pig v1.10.0. The 2026-11-11 output refinements are implemented in a95f37f, without a release claim. Current reference: pig command overview Scope: PIG-owned commands and their …

    Decision date: 2026-02-12 Status: Released in pig v1.1.0 and refined in pig v1.10.0. The 2026-11-11 output refinements are implemented in a95f37f, without a release claim. Current reference: pig command overview Scope: PIG-owned commands and their …