Add PGXN distribution metadata - #344
Open
waldemort-auto[bot] wants to merge 1 commit into
Open
Conversation
pg_durable is absent from every PostgreSQL extension registry. PGXN requires a META.json conforming to the PGXN Meta Spec, which this repository does not have, so a listing is currently impossible rather than merely unrequested. - META.json.in carries the PGXN Meta Spec 1.0.0 document and uses the same @CARGO_VERSION@ token that pgrx already substitutes into pg_durable.control, so the distribution version is derived from Cargo.toml and cannot drift. META.json itself is generated, not committed. - Makefile gains a META.json render rule and a pgxn-zip bundle target, plus EXTRA_CLEAN for the generated artifacts. No existing target changes behaviour; all, build, pg-install and installcheck are untouched. - The release runbook gains a PGXN publishing step and the README documents the new channel. Verified with pgxn-bundle from the pgxn/pgxn-tools image: "META.json is OK", producing pg_durable-0.2.6.zip with META.json at the archive root. The metadata shape follows theory/pg-jsonschema-boon, the reference pgrx extension published on PGXN by PGXN's own author, including provides.file pointing at src/lib.rs. Publishing is a documented manual step for now. Automating it inside the Package Release workflow is left to a follow-up so this change touches no workflow file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@waldemort-auto[bot] please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pg_durableis absent from every PostgreSQL extension registry. Verified 2026-08-13:pgxn.org/dist/pg_durable/-> HTTP 404pgsty.com/ext/pg_durable/-> HTTP 404pgt.dev)The usual framing is that the only install paths are build-from-source, the GHCR image, or a managed service. That is out of date:
package-release.ymlalready builds Debian packages for PG 17 and 18, validates each one inside a realdebian:bookwormcontainer against a PGDG PostgreSQL, and publishes them with source tarballs andSHA256SUMS.So the gap is not that
pg_durableis unpackaged. It is that it is packaged but undiscoverable, and not in a shape anyone else can redistribute. PGXN's Meta Spec file is mandatory, and this repository has noMETA.json, so a listing is currently structurally impossible rather than merely unrequested. This change fixes that.What changed
META.json.inversionuses the@CARGO_VERSION@token that pgrx already substitutes intopg_durable.control, so the distribution version is derived fromCargo.tomland cannot drift.META.jsonitself is generated, never committed.MakefileDISTNAME/DISTVERSION, aMETA.jsonrender rule, apgxn-zipbundle target,EXTRA_CLEAN, one.PHONYentry and one help line..gitignore/META.jsonand/pg_durable-*.zip.prompts/pg_durable-release.mdMETA.json.incheck; new Step 6b documents publishing to PGXN.README.mdNo existing Makefile target changes behaviour.
all,build,pg-install,pg-cleanandinstallcheckare untouched, and thepg-install/pg-cleannaming introduced in 3dd5035 to avoid PGXS collisions is preserved.Version handling
DISTVERSIONis read fromCargo.tomlusing the samesedexpression already used inpackage-release.yml. There is no second version to bump at release time.Validation
Run against the real
pgxn/pgxn-toolsimage, which is the tooling PGXN itself publishes:make pgxn-zipproduces a 335-file archive withpg_durable-0.2.6/META.jsonat the archive root.Design notes
The metadata shape follows
theory/pg-jsonschema-boon, a pgrx extension published on PGXN by PGXN's own author. That settles two questions that have no obvious answer for a pgrx extension:provides.filepoints atsrc/lib.rs, not at a generated.sqlfile.licenseuses thepostgresqlLicense String, matchingLICENSE.txtandCargo.toml. Note that the GitHub API currently reports this repository's license asNOASSERTION, so registry metadata scrapers see an unrecognised license; worth a separate look.Honest scope
pg_durableneedsshared_preload_libraries, a background worker, and a fixed target database, so it is not aCREATE EXTENSION-and-done extension. Registry presence buys discoverability and credibility here rather than one-command installs, and managed PostgreSQL services still cannot install it until each provider allow-lists it. Worth having, but not a download-count lever.There is already unprompted third-party appetite: PGLayers packages
pg_durabletoday, pinningv0.2.5for PG 17 and 18 in itsextension.conf.Prerequisites and follow-ups
manager.pgxn.org/account/registerand own thepg_durabledistribution. The name is currently free.package-release.ymlis a follow-up; the publishing app is not currently permitted to modify workflows, so that change needs either a maintainer commit or aworkflowspermission grant. Until then Step 6b documents the manual path.make installis broken for source consumers — PGXS installspg_durable.controlwith a literal, unsubstituted@CARGO_VERSION@and no.so. Harmless today because nobody installs that way, butpgxn install pg_durablewould walk straight into it. Fix tracked separately so this PR stays metadata-only.Generated with the assistance of GitHub Copilot.