<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>postgres on PIG</title>
    <link>https://pig.pgsty.com/tags/postgres/</link>
    <description>Recent content in postgres on PIG</description>
    <generator>Hugo</generator>
    <language>en</language>
    
    
    
      <lastBuildDate>Thu, 03 Sep 2026 14:13:40 +0800</lastBuildDate>
    
    
      <atom:link href="https://pig.pgsty.com/tags/postgres/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
        <title>The 70% Tuner: Defining the Boundary of pig pg tune</title>
        <link>https://pig.pgsty.com/design/pg-tune/</link>
        <pubDate>Sat, 21 Mar 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/design/pg-tune/</guid>
        <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Decision date:&lt;/strong&gt; 2026-03-21&lt;br&gt;&#xA;&lt;strong&gt;Status:&lt;/strong&gt; Implemented on 2026-03-23 and released in &lt;a href=&#34;https://pig.pgsty.com/release/pig-1.3.2/&#34;&gt;pig v1.3.2&lt;/a&gt;.&lt;br&gt;&#xA;&lt;strong&gt;Current reference:&lt;/strong&gt; &lt;a href=&#34;https://pig.pgsty.com/pg/#pg-tune&#34;&gt;&lt;code&gt;pig pg tune&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;strong&gt;Scope:&lt;/strong&gt; A deterministic first-pass configuration for one local PostgreSQL instance, not a complete production design service.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;decision&#34;&gt;Decision&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;pig pg tune&lt;/code&gt; should answer one bounded question: given a CPU count, memory size, disk size, and a&#xA;workload profile, what are sensible core PostgreSQL parameters for this machine?&lt;/p&gt;&#xA;&lt;p&gt;The command targets a “70% correct” starting point. It detects hardware when possible, accepts&#xA;explicit overrides, calculates a small set of high-impact parameters, and can write them to&#xA;&lt;code&gt;postgresql.auto.conf&lt;/code&gt;. It does not claim to design replication, durability, security, logging,&#xA;extensions, connection pooling, or workload-specific SQL behavior.&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig v1.5.0</title>
        <link>https://pig.pgsty.com/release/pig-1.5.0/</link>
        <pubDate>Sat, 04 Jul 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/release/pig-1.5.0/</guid>
        <description>&lt;p&gt;Pig &lt;code&gt;v1.5.0&lt;/code&gt; is a PostgreSQL operations release for day-to-day DBA work. It adds local database clone/fork workflows, clarifies the boundaries between &lt;code&gt;pg&lt;/code&gt;, &lt;code&gt;pt&lt;/code&gt;, &lt;code&gt;pb&lt;/code&gt;, and &lt;code&gt;pitr&lt;/code&gt;, and tightens preview, confirmation, and structured-output behavior for high-risk operations.&lt;/p&gt;&#xA;&lt;h2 id=&#34;highlights&#34;&gt;Highlights&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;pig pg&lt;/code&gt; is now more focused on local PostgreSQL operations. &lt;code&gt;pig pg clone&lt;/code&gt; creates quick database-level copies, while &lt;code&gt;pig pg fork&lt;/code&gt; creates disposable physical instance forks for local validation, recovery drills, and isolated experiments.&lt;/li&gt;&#xA;&lt;li&gt;Recovery flows are split more clearly: &lt;code&gt;pig pitr&lt;/code&gt; is the orchestration entry point across Patroni, PostgreSQL, and pgBackRest; &lt;code&gt;pig pb restore&lt;/code&gt; remains the low-level pgBackRest restore primitive. Restore commands now require an explicit target and provide more concrete plans and post-restore guidance.&lt;/li&gt;&#xA;&lt;li&gt;Patroni operations are more predictable: high-risk actions such as &lt;code&gt;pig pt restart&lt;/code&gt;, &lt;code&gt;reinit&lt;/code&gt;, &lt;code&gt;switchover&lt;/code&gt;, and &lt;code&gt;failover&lt;/code&gt; use Pig-managed confirmation and plan output; &lt;code&gt;pig pt config pg&lt;/code&gt; points operators to &lt;code&gt;pig pt restart --pending&lt;/code&gt; when a restart is required.&lt;/li&gt;&#xA;&lt;li&gt;Automation is safer: structured output no longer implies confirmation for destructive commands. High-risk execution requires explicit &lt;code&gt;-y/--yes&lt;/code&gt;, while &lt;code&gt;--plan&lt;/code&gt; and &lt;code&gt;next_actions&lt;/code&gt; are more consistent for preview-then-execute workflows.&lt;/li&gt;&#xA;&lt;li&gt;Logs and status output are more useful during incidents: &lt;code&gt;pg&lt;/code&gt;, &lt;code&gt;pb&lt;/code&gt;, and &lt;code&gt;pt&lt;/code&gt; log commands now cover common latest / tail / show / grep workflows, and structured log snapshots use JSONL semantics.&lt;/li&gt;&#xA;&lt;li&gt;Build and release defaults were refreshed: Pig is &lt;code&gt;1.5.0&lt;/code&gt;, embedded Pigsty is &lt;code&gt;4.4.0&lt;/code&gt;, and &lt;code&gt;pig build pgrx&lt;/code&gt; defaults to &lt;code&gt;cargo-pgrx 0.19.1&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;extension-catalog&#34;&gt;Extension Catalog&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Available extensions: &lt;strong&gt;524 -&amp;gt; 531&lt;/strong&gt;, with no removals.&lt;/li&gt;&#xA;&lt;li&gt;New extensions: &lt;code&gt;pg_ducklake&lt;/code&gt;, &lt;code&gt;pgdisablelogerror&lt;/code&gt;, &lt;code&gt;pg_stat_log&lt;/code&gt;, &lt;code&gt;pg_stat_plans&lt;/code&gt;, &lt;code&gt;passwordpolicy&lt;/code&gt;, &lt;code&gt;db2fce&lt;/code&gt;, &lt;code&gt;plpgsql_wrap&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Refreshed a batch of existing extension versions and package metadata, including &lt;code&gt;timescaledb 2.28.2&lt;/code&gt;, &lt;code&gt;postgis 3.6.4&lt;/code&gt;, &lt;code&gt;vector 0.8.4&lt;/code&gt;, &lt;code&gt;biscuit 2.4.1&lt;/code&gt;, &lt;code&gt;citus 14.1.0&lt;/code&gt;, &lt;code&gt;orioledb 1.8&lt;/code&gt;, &lt;code&gt;documentdb 0.113&lt;/code&gt;, &lt;code&gt;credcheck 5.0&lt;/code&gt;, and &lt;code&gt;pgtt 4.5&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;orioledb&lt;/code&gt; aliases no longer pin to PG17; they resolve against the requested PostgreSQL major. EL9 ARM64 Patroni aliases now point to noarch packages.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;compatibility-notes&#34;&gt;Compatibility Notes&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;-y/--yes&lt;/code&gt; for destructive operations in automation; structured output mode no longer substitutes for human confirmation.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pig pb restore&lt;/code&gt; and &lt;code&gt;pig pitr&lt;/code&gt; require exactly one explicit recovery target; use &lt;code&gt;--target-action=promote&lt;/code&gt; for auto-promote behavior.&lt;/li&gt;&#xA;&lt;li&gt;Several ambiguous short options were cleaned up. For log commands, &lt;code&gt;-o json&lt;/code&gt; means a JSONL snapshot and is not used for tail/follow streaming modes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;checksums&#34;&gt;Checksums&#xA;&lt;/h2&gt;&#xA;| File | Checksum |&#xA;| --- | --- |&#xA;| [pig\-1\.5\.0\-1\.aarch64\.rpm](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-1.5.0-1.aarch64.rpm) | SHA-256 · `9f83b78ed2eccedd55a86c634f88364f1945c3cefa1b23efdd72a7cf2062e1df` |&#xA;| [pig\-1\.5\.0\-1\.x86\_64\.rpm](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-1.5.0-1.x86_64.rpm) | SHA-256 · `b792001498e9907d4659db46640f9c5164152b20689f90f93418f76fb4633e6e` |&#xA;| [pig\-v1\.5\.0\.darwin\-amd64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-v1.5.0.darwin-amd64.tar.gz) | SHA-256 · `ae1081dfbff8564ecdf713c85e8025c91bfd38e6575ea9ac99a92f968ab8a29d` |&#xA;| [pig\-v1\.5\.0\.darwin\-arm64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-v1.5.0.darwin-arm64.tar.gz) | SHA-256 · `6d69efcdcdc79fd90d2112e1e8042887020402aa037252d89d632243e7085dc6` |&#xA;| [pig\-v1\.5\.0\.linux\-amd64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-v1.5.0.linux-amd64.tar.gz) | SHA-256 · `8f914821b317cde73d3aec4ed311d5e90710bbc8cb372c1de3322083c31f4a85` |&#xA;| [pig\-v1\.5\.0\.linux\-arm64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.5.0/pig-v1.5.0.linux-arm64.tar.gz) | SHA-256 · `d4de9ef1c28d0a3661c4a4d47c469b7bfd5f5bddb610325796afb669ab162234` |&#xA;| [pig\_1\.5\.0\-1\_amd64\.deb](https://github.com/pgsty/pig/releases/download/v1.5.0/pig_1.5.0-1_amd64.deb) | SHA-256 · `35fd32affb4cb5bcca845d47a768782fb7005f06fcc1bcb5b7755d2627f96245` |&#xA;| [pig\_1\.5\.0\-1\_arm64\.deb](https://github.com/pgsty/pig/releases/download/v1.5.0/pig_1.5.0-1_arm64.deb) | SHA-256 · `2be1df804d3f630560bc3ced0107c49ffad8bb52b004f72c7f8b4d09dc8d3e04` |&lt;div class=&#34;td-release-card-static&#34;&gt;&#xA;  &lt;p&gt;&lt;strong&gt;v1.5.0&lt;/strong&gt; · &lt;time datetime=&#34;2026-07-04&#34;&gt;2026-07-04&lt;/time&gt;&lt;/p&gt;</description>
      </item>
    <item>
        <title>One Grammar for Dangerous Work: PIG&#39;s Operations CLI Safety Contract</title>
        <link>https://pig.pgsty.com/design/ops-cli-safety/</link>
        <pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/design/ops-cli-safety/</guid>
        <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Decision date:&lt;/strong&gt; 2026-07-02&lt;br&gt;&#xA;&lt;strong&gt;Status:&lt;/strong&gt; Released for &lt;code&gt;pg&lt;/code&gt;, &lt;code&gt;pb&lt;/code&gt;, &lt;code&gt;pt&lt;/code&gt;, and &lt;code&gt;pitr&lt;/code&gt; by v1.5.0; the 2026-08-29 &lt;code&gt;do&lt;/code&gt; and &lt;code&gt;build proxy&lt;/code&gt; refinements were released in &lt;a href=&#34;https://pig.pgsty.com/release/pig-1.8.1/&#34;&gt;v1.8.1&lt;/a&gt;.&lt;br&gt;&#xA;&lt;strong&gt;Current reference:&lt;/strong&gt; &lt;a href=&#34;https://pig.pgsty.com/pg/&#34;&gt;&lt;code&gt;pig pg&lt;/code&gt;&lt;/a&gt;, &lt;a href=&#34;https://pig.pgsty.com/pb/&#34;&gt;&lt;code&gt;pig pb&lt;/code&gt;&lt;/a&gt;, &lt;a href=&#34;https://pig.pgsty.com/pitr/&#34;&gt;&lt;code&gt;pig pitr&lt;/code&gt;&lt;/a&gt;, &lt;a href=&#34;https://pig.pgsty.com/do/&#34;&gt;&lt;code&gt;pig do&lt;/code&gt;&lt;/a&gt;, and &lt;a href=&#34;https://pig.pgsty.com/build/&#34;&gt;&lt;code&gt;pig build&lt;/code&gt;&lt;/a&gt;&lt;br&gt;&#xA;&lt;strong&gt;Scope:&lt;/strong&gt; PIG-owned operational commands; transparent upstream commands retain upstream confirmation and exit behavior.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;decision&#34;&gt;Decision&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Operational convenience must not blur operational meaning. PIG distinguishes low-level primitives&#xA;from multi-stage orchestrators, makes destructive intent explicit, reserves aliases carefully, and&#xA;requires plans and structured results to describe the same action that text mode will execute.&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig v1.3.2</title>
        <link>https://pig.pgsty.com/release/pig-1.3.2/</link>
        <pubDate>Mon, 23 Mar 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/release/pig-1.3.2/</guid>
        <description>&lt;p&gt;Routine maintenance release.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Refresh a batch of extension version metadata and catalog entries.&lt;/li&gt;&#xA;&lt;li&gt;Add the &lt;code&gt;pig pg tune&lt;/code&gt; subcommand to generate PostgreSQL tuning parameters from hardware resources and workload profiles.&lt;/li&gt;&#xA;&lt;li&gt;Add &lt;code&gt;pdu&lt;/code&gt; and &lt;code&gt;pgdog&lt;/code&gt; source package aliases for &lt;code&gt;pig build get&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Migrate extension catalog URLs from &lt;code&gt;pgext.cloud&lt;/code&gt; to &lt;code&gt;pigsty.io/ext&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;checksums&#34;&gt;Checksums&#xA;&lt;/h2&gt;&#xA;| File | Checksum |&#xA;| --- | --- |&#xA;| [pig\-1\.3\.2\-1\.aarch64\.rpm](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-1.3.2-1.aarch64.rpm) | SHA-256 · `d760f47652ff3e2e4a61eb7b9a68ca68665b2b36c187c52f5eaf50d2f007d8f3` |&#xA;| [pig\-1\.3\.2\-1\.x86\_64\.rpm](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-1.3.2-1.x86_64.rpm) | SHA-256 · `c2e02e62497f4c2055a9b448ddb3a24c618fcd488580c28b2b9a0e7cedacef55` |&#xA;| [pig\-v1\.3\.2\.darwin\-amd64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-v1.3.2.darwin-amd64.tar.gz) | SHA-256 · `b8d066ddefa4530946c74c30e7e4acdab6abf8da70a47dcfe2a77719b79e397f` |&#xA;| [pig\-v1\.3\.2\.darwin\-arm64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-v1.3.2.darwin-arm64.tar.gz) | SHA-256 · `a90e78d879fd720fd2865870c696aed7952558d5ae75591deced3121f2aab1f9` |&#xA;| [pig\-v1\.3\.2\.linux\-amd64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-v1.3.2.linux-amd64.tar.gz) | SHA-256 · `2fe3a9ffbb6383154dfd25ed79420b210828eabf6a96a8af6e8feb9d744b9559` |&#xA;| [pig\-v1\.3\.2\.linux\-arm64\.tar\.gz](https://github.com/pgsty/pig/releases/download/v1.3.2/pig-v1.3.2.linux-arm64.tar.gz) | SHA-256 · `522290aaf14f98f0bae83ce75cc76749f2a4e72742eb5c3cba36a1d2fa4d12c2` |&#xA;| [pig\_1\.3\.2\-1\_amd64\.deb](https://github.com/pgsty/pig/releases/download/v1.3.2/pig_1.3.2-1_amd64.deb) | SHA-256 · `d6c1cf2c52962045f6bbfb2a669058e7f903088526591d6c939e7723f3928d30` |&#xA;| [pig\_1\.3\.2\-1\_arm64\.deb](https://github.com/pgsty/pig/releases/download/v1.3.2/pig_1.3.2-1_arm64.deb) | SHA-256 · `4352385c629b26a1837054445a546da89591499848b557699c2fb70fde9377aa` |&lt;div class=&#34;td-release-card-static&#34;&gt;&#xA;  &lt;p&gt;&lt;strong&gt;v1.3.2&lt;/strong&gt; · &lt;time datetime=&#34;2026-03-23&#34;&gt;2026-03-23&lt;/time&gt;&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig v1.0.0</title>
        <link>https://pig.pgsty.com/release/pig-1.0.0/</link>
        <pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/release/pig-1.0.0/</guid>
        <description>&lt;p&gt;This release introduces three major new subcommand groups (&lt;code&gt;pig pg&lt;/code&gt;, &lt;code&gt;pig pt&lt;/code&gt;, &lt;code&gt;pig pb&lt;/code&gt;) for managing PostgreSQL, Patroni, and pgBackRest, along with an orchestrated PITR command and enhanced extension availability display.&lt;/p&gt;&#xA;&lt;h2 id=&#34;new-commands&#34;&gt;New Commands&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;code&gt;pig pg&lt;/code&gt; - PostgreSQL instance management&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;pg init/start/stop/restart/reload/status&lt;/code&gt; - Control and manage PostgreSQL instances&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pg role/promote&lt;/code&gt; - Detect and switch instance role (primary/replica)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pg psql/ps/kill&lt;/code&gt; - Connection and session management&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pg vacuum/analyze/freeze/repack&lt;/code&gt; - Database maintenance operations&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pg log&lt;/code&gt; - Log viewing (&lt;code&gt;list/tail/cat/less&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;code&gt;pig pt&lt;/code&gt; - Patroni cluster management&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig postgres</title>
        <link>https://pig.pgsty.com/pg/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/pg/</guid>
        <description>&lt;p&gt;The &lt;code&gt;pig pg&lt;/code&gt; command (alias &lt;code&gt;pig postgres&lt;/code&gt;) manages local PostgreSQL servers and databases. It wraps local primitives such as &lt;code&gt;pg_ctl&lt;/code&gt;, &lt;code&gt;psql&lt;/code&gt;, and &lt;code&gt;vacuumdb&lt;/code&gt;; use &lt;code&gt;pig pt&lt;/code&gt; for Patroni cluster operations and &lt;code&gt;pig pitr&lt;/code&gt; for orchestrated PITR.&lt;/p&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-eac57e83-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;41&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-eac57e83-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pg - Local PostgreSQL primitives &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pg_ctl / psql / &lt;span class=&#34;nb&#34;&gt;local&lt;/span&gt; files&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Server Control &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;via pg_ctl&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg init     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-v ver&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;     initialize data directory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg start    &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;              start PostgreSQL server&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg stop     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-m fast&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;    stop PostgreSQL server&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg restart  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-m fast&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;    restart PostgreSQL server&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg reload   &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;              reload configuration&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg status   &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;              show server status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg promote  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;              promote standby to primary&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg role     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-V&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;         detect instance role &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;primary/replica&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Service Management &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;via systemctl&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg svc start                          start postgres systemd service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg svc stop                           stop postgres systemd service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg svc restart                        restart postgres systemd service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg svc reload                         reload postgres systemd service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg svc status                         show postgres service status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Connection &lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; Query:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg psql     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;db&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-c cmd&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;             connect to database via psql&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg ps       &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u user&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;            show current connections&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg &lt;span class=&#34;nb&#34;&gt;kill&lt;/span&gt;     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-x&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u user&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;            terminate connections &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dry-run by default&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg clone    &amp;lt;src&amp;gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;dst&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;               clone database with CREATE DATABASE TEMPLATE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Database Maintenance:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg vacuum   &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;db&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t table&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      vacuum tables&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg analyze  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;db&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t table&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      analyze tables&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg freeze   &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;db&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t table&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      vacuum freeze tables&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg repack   &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;db&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t table&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      repack tables &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;online rebuild&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Tuning:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg tune     &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p profile&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;     generate optimized parameters&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Instance Fork:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg fork init &amp;lt;name&amp;gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D datadir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      fork PGDATA into /pg/data-&amp;lt;name&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg fork list                          list managed forks&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg fork start&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;stop&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;rm &amp;lt;name&amp;gt;          manage fork lifecycle&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Utilities:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  pig pg log &amp;lt;list&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;tail&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;cat&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;less&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;grep&amp;gt;      view PostgreSQL logs&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;command-overview&#34;&gt;Command Overview&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Service Control&lt;/strong&gt; (pg_ctl wrapper):&lt;/p&gt;</description>
      </item>
    <item>
        <title>pig pe</title>
        <link>https://pig.pgsty.com/pe/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/pe/</guid>
        <description>&lt;p&gt;&lt;code&gt;pig pe&lt;/code&gt; (aliases: &lt;code&gt;pgexp&lt;/code&gt;, &lt;code&gt;pgexporter&lt;/code&gt;) is a legacy convenience wrapper for a running&#xA;&lt;a href=&#34;https://github.com/Vonng/pg_exporter&#34;&gt;pg_exporter&lt;/a&gt;. It reads the default metrics and statistics&#xA;endpoints and can request a configuration reload. It is not a general or versioned pg_exporter&#xA;client.&lt;/p&gt;&#xA;&lt;div class=&#34;td-code td-code--untitled&#34; id=&#34;td-code-3ed3d12b-fence-0&#34; data-td-code data-td-code-auto-id&#xA;     data-td-language=&#34;bash&#34; data-td-line-count=&#34;4&#34;&gt;&#xA;  &lt;div class=&#34;td-code__viewport&#34; id=&#34;td-code-3ed3d12b-fence-0-viewport&#34; data-td-code-viewport&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe get                     &lt;span class=&#34;c1&#34;&gt;# print pg_ metrics&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe list                    &lt;span class=&#34;c1&#34;&gt;# list metric families from HELP lines&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe stat                    &lt;span class=&#34;c1&#34;&gt;# print exporter statistics&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pig pe reload                  &lt;span class=&#34;c1&#34;&gt;# request configuration reload&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;endpoint-selection&#34;&gt;Endpoint selection&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The default endpoint is &lt;code&gt;http://127.0.0.1:9630&lt;/code&gt;. Select another exporter with persistent options:&lt;/p&gt;</description>
      </item>
    <item>
        <title>Instantly Clone PostgreSQL Databases—No Black Magic Required</title>
        <link>https://pig.pgsty.com/article/pg-pig-clone/</link>
        <pubDate>Mon, 06 Jul 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/article/pg-pig-clone/</guid>
        <description>&lt;p&gt;Six months ago, on January 8, 2026, I wrote &lt;a href=&#34;https://vonng.com/en/pg/pg-clone/&#34;&gt;&lt;strong&gt;Git for Data: Instant PostgreSQL Database and Instance Cloning&lt;/strong&gt;&lt;/a&gt;, introducing a new feature in PostgreSQL 18 and Pigsty v4.0: instant database cloning. With filesystem copy-on-write (CoW) and PostgreSQL 18&amp;rsquo;s new &lt;code&gt;file_copy_method = clone&lt;/code&gt; setting, &lt;strong&gt;you can clone a huge database in seconds without consuming additional storage&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is a particularly good fit for AI agents. As I wrote in &lt;a href=&#34;https://vonng.com/en/db/agent-native-db/&#34;&gt;What Kind of Database Do AI Agents Need?&lt;/a&gt;, ultra-low-cost database cloning is critical for counterfactual experiments. So when Pigsty 4.0 shipped, I added this capability to its PostgreSQL database provisioning workflow.&lt;/p&gt;</description>
      </item>
    <item>
        <title>What Is a PostgreSQL Distribution?</title>
        <link>https://pig.pgsty.com/article/what-is-pg-distro/</link>
        <pubDate>Sat, 04 Jul 2026 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/article/what-is-pg-distro/</guid>
        <description>&lt;p&gt;People often ask me: what exactly is &lt;a href=&#34;https://pigsty.io&#34;&gt;&lt;strong&gt;Pigsty&lt;/strong&gt;&lt;/a&gt;?&lt;/p&gt;&#xA;&lt;p&gt;My usual answer is: a PostgreSQL distribution.&lt;/p&gt;&#xA;&lt;p&gt;The next question is usually: what, then, is a “PostgreSQL distribution”?&lt;/p&gt;&#xA;&lt;p&gt;That is a good question. And the best place to begin is not databases, but operating systems.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;i-start-with-linux-distributions&#34;&gt;I. Start with Linux Distributions&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;When most people hear “distribution,” they think of Linux distributions: Red Hat, Debian, Ubuntu, SUSE, Arch, and so on. But if Linux already exists, why do we need Linux distributions? What exactly is the relationship between the two?&lt;/p&gt;</description>
      </item>
    <item>
        <title>Forging a China-Rooted, Global PostgreSQL Distro</title>
        <link>https://pig.pgsty.com/article/forge-a-pg-distro/</link>
        <pubDate>Thu, 27 Nov 2025 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/article/forge-a-pg-distro/</guid>
        <description>&lt;p&gt;Hi, I’m Feng Ruohang, author of Pigsty and an independent open-source contributor. Let’s talk about &lt;strong&gt;how to build a PostgreSQL distribution that is rooted in China and useful to the whole world.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The question isn’t whether PG will win—it already has. The question is: &lt;strong&gt;What role do we play in that victory?&lt;/strong&gt; Spectator or protagonist? Follower or leader?&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-now&#34;&gt;Why now&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;postgresql-is-the-default-database&#34;&gt;PostgreSQL is the default database&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Stack Overflow’s 2025 survey shows &lt;strong&gt;58.2%&lt;/strong&gt; of professional developers use PG—18.6 points ahead of MySQL, and the gap is widening. New SaaS, AI startups, even OpenAI default to PG. DB-Engines rankings and JetBrains surveys tell the same story.&lt;/p&gt;</description>
      </item>
    <item>
        <title>Pig, The Postgres Extension Wizard</title>
        <link>https://pig.pgsty.com/article/pig/</link>
        <pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate>
        
        <guid>https://pig.pgsty.com/article/pig/</guid>
        <description>&lt;p&gt;Ever wished installing or upgrading PostgreSQL extensions didn’t feel like digging through outdated readmes, cryptic configure scripts, or random GitHub forks &amp;amp; patches? The painful truth is that Postgres’s richness of extension often comes at the cost of complicated setups—especially if you’re juggling multiple distros or CPU architectures.&lt;/p&gt;&#xA;&lt;p&gt;Enter &lt;strong&gt;Pig&lt;/strong&gt;, a Go-based package manager built to tame Postgres and its ecosystem of &lt;a href=&#34;https://pgext.cloud/list&#34;&gt;440+&lt;/a&gt; extensions in one fell swoop. TimescaleDB, Citus, PGVector, 20+ Rust extensions, plus every must-have piece to &lt;a href=&#34;https://pigsty.io/docs/app/supabase/&#34;&gt;self-host&lt;/a&gt; Supabase — Pig’s unified CLI makes them all effortlessly accessible. It cuts out messy source builds and half-baked repos, offering version-aligned RPM/DEB packages that work seamlessly across Debian, Ubuntu, and RedHat flavors. No guesswork, no drama.&lt;/p&gt;</description>
      </item>
    
  </channel>
</rss>
