Skip to content

Add PGXNTOOL_ENABLE_FS_INSTALL and PGXNTOOL_ENABLE_PGXN_INSTALL - #91

Draft
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-55-fs-install
Draft

Add PGXNTOOL_ENABLE_FS_INSTALL and PGXNTOOL_ENABLE_PGXN_INSTALL#91
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-55-fs-install

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • test/verify-results/installcheck/test-build always filesystem-installed the extension via PGXS's install, with no way to disable it -- breaking "existing mode"/pg_tle-style testing, where the extension under test is deployed some other way and a filesystem install as a side effect defeats the point of the test. PGXNTOOL_ENABLE_FS_INSTALL (default yes) now gates install out of all four.
  • installcheck also unconditionally auto-installed the pgtap dependency via pgxn install pgtap --sudo. PGXNTOOL_ENABLE_PGXN_INSTALL independently gates that, defaulting to follow PGXNTOOL_ENABLE_FS_INSTALL but overridable on its own.
  • Documented both variables in README.asc; HISTORY.asc entry added.

Fixes #55.
Fixes #90.

Companion pgxntool-test PR: Postgres-Extensions/pgxntool-test#70

Test plan

  • test/standard/make-test.bats (35/35) and full test-all suite (257/257) pass in pgxntool-test against this branch

`test`/`verify-results`/`installcheck`/`test-build` always filesystem-installed
the extension via PGXS's `install`, with no way to disable it. That defeated
"existing mode" testing, where the extension under test was deployed some
other way (e.g. a pg_tle registration, or a real pg_upgrade) -- the whole
point is to prove that other deployment path works, not to filesystem-install
as a side effect. `PGXNTOOL_ENABLE_FS_INSTALL` (default `yes`) now gates
`install` out of all four.

`installcheck` also unconditionally auto-installed the pgtap dependency via
`pgxn install pgtap --sudo` -- itself a filesystem-install side effect.
`PGXNTOOL_ENABLE_PGXN_INSTALL` independently gates that (defaulting to follow
`PGXNTOOL_ENABLE_FS_INSTALL`, but overridable on its own).

Documented both in README.asc's make-targets and environment-variable
reference sections.

Fixes Postgres-Extensions#55.
Fixes Postgres-Extensions#90.

Related changes in pgxntool-test:
- Added BATS coverage in `test/standard/make-test.bats`: default/override
  behavior for both variables, structural proof (`make -p -n`) that
  `install`/`pgtap` prerequisites are genuinely removed, and end-to-end
  proof that `make test PGXNTOOL_ENABLE_FS_INSTALL=no` succeeds against an
  already-installed tree but fails against a genuinely uninstalled one.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e18b0e6d-cd6a-426e-9a52-5b681c50501d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

testdeps' own `testdeps: pgtap` prerequisite is unconditional, so without an
unconditional .PHONY declaration for pgtap, disabling PGXNTOOL_ENABLE_PGXN_INSTALL
would leave `pgtap` completely undefined and fail with "No rule to make
target 'pgtap'". Document that instead of leaving it looking like an
inconsistency with check-stale-expected's own (intentionally different)
.PHONY placement.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant