This document describes the release process for pg_textsearch.
We use semantic versioning: MAJOR.MINOR.PATCH
- Development versions use
-devsuffix (e.g.,0.3.0-dev) - Release versions drop the suffix (e.g.,
0.3.0)
Change version from X.Y.Z-dev to X.Y.Z in these files:
| File | What to update |
|---|---|
pg_textsearch.control |
default_version |
mod.c |
.version in PG_MODULE_MAGIC_EXT |
Makefile |
DATA list (SQL filenames) |
README.md |
Status line, image reference |
CLAUDE.md |
Current Version |
Rename the main SQL file:
git mv sql/pg_textsearch--X.Y.Z-dev.sql sql/pg_textsearch--X.Y.Z.sqlRename the upgrade script:
git mv sql/pg_textsearch--W.V.U--X.Y.Z-dev.sql sql/pg_textsearch--W.V.U--X.Y.Z.sqlUpdate SQL file contents:
- In the main SQL file, update the version comment at the top
- Update the
RAISE INFOmessage (remove prerelease warnings for releases)
Add the new upgrade script to the DATA list:
DATA = sql/pg_textsearch--X.Y.Z.sql \
... \
sql/pg_textsearch--W.V.U--X.Y.Z.sqlgit mv images/tapir_and_friends_vX.Y.Z-dev.png images/tapir_and_friends_vX.Y.Z.pngUpdate the image reference in README.md.
Update the status line to reflect release state. Examples:
# For early releases:
🚀 **Status**: v0.3.0 - Query performance is production-ready. Index compression
and parallel index builds are coming soon. See [ROADMAP.md](ROADMAP.md) for details.
# For stable releases:
🚀 **Status**: v1.0.0 - Production ready. See [ROADMAP.md](ROADMAP.md) for upcoming features.Remove any "Now Open Source" or similar one-time announcements from previous releases.
If any on-disk format changed during this release cycle, bump the corresponding
version constant in src/constants.h:
| Constant | Purpose |
|---|---|
TP_METAPAGE_VERSION |
Index metapage format |
TP_DOCID_PAGE_VERSION |
Document ID page format |
TP_PAGE_INDEX_VERSION |
Page index format |
TP_SEGMENT_FORMAT_VERSION |
Segment block storage format (in segment.h) |
Also check TPQUERY_VERSION in src/types/query.h if bm25query format changed.
Important: Version bumps break upgrade compatibility. If you bump a version, update the upgrade test workflow to exclude incompatible old versions, and document the breaking change in release notes.
make clean && make && make install
make testIf INFO messages changed, regenerate expected outputs:
make expectedDon't forget alternative expected files (*_1.out) which need manual updates.
Verify all tests pass:
make test # Should show "All N tests passed"git checkout -b release-X.Y.Z
git add -A
git commit -m "Release vX.Y.Z"
git push -u origin release-X.Y.Z
gh pr create --title "Release vX.Y.Z" --body "## Summary
- Update version from X.Y.Z-dev to X.Y.Z
- [other changes]
## Testing
- \`make test\` passes
- \`make format-check\` passes"The release workflow (release.yml) triggers automatically when a PR with title
starting "Release v" merges to main. It:
- Creates a git tag
- Builds release artifacts for PG17/PG18 on Linux/macOS (amd64/arm64)
- Creates a GitHub release with the artifacts
Create a PR in the timescaledb-docker-ha repo to update the pg_textsearch version. This ensures the new release is included in Timescale's Docker images.
After the release is published, create a PR to bump to the next dev version:
# Example: after releasing 0.3.0, bump to 0.4.0-dev
git checkout main && git pull
git checkout -b bump-to-0.4.0-devUpdate files with 0.4.0-dev, create new SQL files, etc.
Don't forget: Add the just-released version to the old_version matrix in
.github/workflows/upgrade-tests.yml so future releases are tested for upgrade
compatibility from this version.
Every release must have an upgrade path from the previous stable release
(e.g., 0.2.0--0.3.0.sql). Dev versions are not supported for direct upgrades;
users on dev versions should reinstall the extension.
Bugfix release upgrade paths: When releasing a bugfix version (e.g., 0.4.2),
ensure that all later versions (including dev versions like 0.5.0-dev) have an
upgrade path from it. For example, after releasing 0.4.2, main branch needs
sql/pg_textsearch--0.4.2--0.5.0-dev.sql so users can upgrade from the bugfix
release to the next version.
Not all version upgrades are compatible with ALTER EXTENSION UPDATE. Breaking
changes that require index recreation or server restart:
| Change Type | Impact | User Action Required |
|---|---|---|
| Metapage version bump | Existing indexes incompatible | REINDEX or recreate index |
| Shared memory structure change | Server crash on mixed versions | Restart Postgres after upgrade |
| Segment format change | Old segments unreadable | Recreate index |
Current compatibility matrix:
| From Version | To Version | Compatible? | Notes |
|---|---|---|---|
| 0.5.x | 0.6.0 | Segment format v3→v4 (uint32→uint64 offsets) | |
| 0.3.0 | 0.4.0 | ❌ No | Segment format v2→v3 for compression |
| 0.2.0 | 0.4.0 | ❌ No | Segment format v2→v3 |
| 0.2.0 | 0.3.0 | ✅ Yes | Direct upgrade works |
| 0.1.0 | 0.3.0 | ❌ No | Metapage v4→v5, shmem size change |
| < 0.1.0 | 0.3.0 | ❌ No | Multiple breaking changes |
When releasing a version with breaking changes:
- Update
.github/workflows/upgrade-tests.ymlto exclude incompatible versions - Document in release notes that users must recreate indexes
- Consider providing a migration guide for major version bumps
| Workflow | Trigger | Purpose |
|---|---|---|
ci.yml |
PR, push to main | Build and test on PG17/18 |
upgrade-tests.yml |
PR (sql/control changes), weekly | Test extension upgrades |
release.yml |
PR merge with "Release v" title | Create release and artifacts |
benchmark.yml |
Weekly, manual | Performance regression testing |
If tests fail with old version messages, check for stale files:
ls ~/pg18/share/postgresql/extension/pg_textsearch*Remove old dev versions that shouldn't be installed:
rm ~/pg18/share/postgresql/extension/pg_textsearch--X.Y.Z-dev.sqlIf ALTER EXTENSION pg_textsearch UPDATE fails, verify:
- The upgrade SQL file exists in the share directory
- The control file has the correct
default_version - The upgrade path exists (check
pg_extension_update_paths('pg_textsearch'))