{"by":"coatue","descendants":21,"id":38463731,"kids":[38466163,38467602,38466975,38463830,38469410,38498454,38469539,38466981,38464232],"score":81,"text":"pgxman is npm for Postgres extensions, simplifying the discovery and use of extensions so you can easily enhance your applications.<p>Installing and updating Postgres extensions is an uphill battle. You&#x27;re left searching for the right build tools and grappling with often unclear and incomplete compiling instructions to even try one out. But with pgxman, we&#x27;ve streamlined the process to one simple step: pgxman install [extension name].<p>For example, to build parquet_s3_fdw manually, you&#x27;d need to:<p>1. Download the parquet_s3_fdw source code;<p>2. Figure out how to build it by looking at README. When unclear, look at the source code how to build it. The README of parquet_s3_fdw says it needs libarrow, libparquet &amp; aws_sdk. Readme doesn’t say where to get them.<p>3. Make sure all dependencies are available to build the project. Either install them from apt, if available, or build them manually if not. For parquet_s3_fdw aws_sdk has to be built manually — it’s not available in any apt repos<p>4. Build the extension targeting the correct OS, CPU architecture and Postgres version.<p>5. Determine and build to the right path &#x2F;usr&#x2F;lib&#x2F;postgresql&#x2F;15&#x2F;lib - otherwise, Postgres wouldn’t be able to find them.<p>6. Repeat across all relevant Postgres instances. Hopefully, these Postgres versions are recent or else you’ll have to update postgres, set maintenance window, etc.<p>* Added friction: Since parquet_s3_fdw is not designed to use in a cloud environment, and we forked it to make changes to make it possible to use.<p>Using pgxman, you can just do:<p><pre><code>  pgxman install s3_parquet_fdw\n</code></pre>\npgxman integrates with your system package manager, ensuring the correct versions are installed without extra packages from any shared dependencies between extensions. pgxman’s automated build system creates [APT] packages for each Postgres version, platform, and OS supported by the extension. Extensions are built from a “buildkit” formula, written in YAML, and are contributed through GitHub.<p>To install pgxman, you can do<p><pre><code>  brew install pgxman&#x2F;tap&#x2F;pgxman\n</code></pre>\nor, if you don&#x27;t mind pipe-to-shell,<p><pre><code>  curl -sfl https:&#x2F;&#x2F;install.pgx.sh | sh -\n</code></pre>\nIf you&#x27;d like to learn more, we have an extensive blog post here: <a href=\"https:&#x2F;&#x2F;www.hydra.so&#x2F;blog-posts&#x2F;the-design-of-postgres-extension-manager-pgxman\">https:&#x2F;&#x2F;www.hydra.so&#x2F;blog-posts&#x2F;the-design-of-postgres-exten...</a>.","time":1701284895,"title":"Show HN: pgxman – npm for Postgres extensions","type":"story","url":"https://pgxman.com/"}