Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update READMEs for recent trunk changes #885

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,22 @@ jobs:
- dind
- xlarge-16x16
container:
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
image: quay.io/tembo/trunk-test-tembo:1d073a4-pg15
options: --user root
needs:
- find_directories
strategy:
fail-fast: false
matrix:
ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
# ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
ext:
- { name: pgfincore, path: "./contrib/pgfincore" }
- { name: pgtelemetry, path: "./contrib/pgtelemetry" }
- { name: pljava, path: "./contrib/pljava" }
- { name: postgresql_anonymizer, path: "./contrib/postgresql_anonymizer" }
- { name: emaj, path: "./contrib/emaj" }
- { name: pg_semver, path: "./contrib/pg_semver" }
- { name: rdkit, path: "./contrib/rdkit" }
pg: [15]
exclude:
# pg_hint_plan has separate extensions for each major version
Expand Down Expand Up @@ -92,14 +100,22 @@ jobs:
- dind
- xlarge-16x16
container:
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
image: quay.io/tembo/trunk-test-tembo:1d073a4-pg15
options: --user root
needs:
- find_directories
strategy:
fail-fast: false
matrix:
ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
# ext: ${{ fromJson(needs.find_directories.outputs.directories).include }}
ext:
- { name: pgfincore, path: "./contrib/pgfincore" }
- { name: pgtelemetry, path: "./contrib/pgtelemetry" }
- { name: pljava, path: "./contrib/pljava" }
- { name: postgresql_anonymizer, path: "./contrib/postgresql_anonymizer" }
- { name: emaj, path: "./contrib/emaj" }
- { name: pg_semver, path: "./contrib/pg_semver" }
- { name: rdkit, path: "./contrib/rdkit" }
pg: [17, 16, 15, 14]
exclude:
- { pg: 14, ext: { name: pg_walinspect } } # Added in Postgres 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trunk-install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- dind
- large-8x8
container:
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
image: quay.io/tembo/trunk-test-tembo:1d073a4-pg15
options: --user root
env:
PGHOST: "localhost"
Expand Down
91 changes: 62 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,46 @@ complexities of extension development and management with the following commands
Compile extensions of all kinds.

```shell
❯ trunk build
Building from path .
Detected that we are building a pgrx extension
Detected pgrx version range 0.7.4
Using pgrx version 0.7.4
Building pgrx extension at path .
❯ trunk build --pg-version 17
info: Building from path .
info: Using Dockerfile at ./Dockerfile
info: Using install command /usr/bin/bash -c make -C pg_cron install
Building with name pg_cron
Building with version 1.6.4
Building for PostgreSQL 17
.
.
.
Creating package at: ./.trunk/pgmq-0.5.0.tar.gz
Creating package at: ./.trunk/pg_cron-1.6.4-pg17.tar.gz
Fetching extension_name from control file: extension/pg_cron.control
Using extension_name: pg_cron
Create Trunk bundle:
pgmq.so
extension/pgmq--0.5.0.sql
extension/pgmq.control
pg_cron.so
licenses/LICENSE
extension/pg_cron--1.0--1.1.sql
extension/pg_cron--1.0.sql
extension/pg_cron--1.1--1.2.sql
extension/pg_cron--1.2--1.3.sql
extension/pg_cron--1.3--1.4.sql
extension/pg_cron--1.4--1.4-1.sql
extension/pg_cron--1.4-1--1.5.sql
extension/pg_cron--1.5--1.6.sql
extension/pg_cron.control
manifest.json
Packaged to ./.trunk/pgmq-0.5.0.tar.gz
Packaged to ./.trunk/pg_cron-1.6.4-pg17.tar.gz
```

### `trunk publish`
Publish extensions to the registry, making them available to the Postgres community for discovery and installation.

```shell
❯ trunk publish pgmq \
--version 0.5.0 \
--description "Message Queue for postgres" \
--documentation "https://github.com/tembo-io/pgmq" \
--repository "https://github.com/tembo-io/pgmq" \
--license "Apache-2.0" \
--homepage "https://www.tembo.io"
❯ trunk publish pg_cron \
--version 1.6.4 \
--description "Job scheduler for PostgreSQL" \
--documentation "https://github.com/citusdata/pg_cron" \
--repository "https://github.com/citusdata/pg_cron" \
--license "PostgreSQL" \
--homepage "https://www.citusdata.com/"
```

### `trunk install`
Expand All @@ -69,16 +80,39 @@ Downloads Postgres extensions from the Trunk registry and installs into your env
Supports nested dependencies, e.g. installing `extension_a` will automatically install `extension_b` if required.

```shell
❯ trunk install pgmq
Using pg_config: /usr/bin/pg_config
Using pkglibdir: "/usr/lib/postgresql/15/lib"
Using sharedir: "/usr/share/postgresql/15"
Downloading from: https://cdb-plat-use1-prod-pgtrunkio.s3.amazonaws.com/extensions/pgmq/pgmq-0.5.0.tar.gz
Dependencies: ["pg_partman"]
Installing pgmq 0.5.0
[+] pgmq.so => /usr/lib/postgresql/15/lib
[+] extension/pgmq--0.5.0.sql => /usr/share/postgresql/15
[+] extension/pgmq.control => /usr/share/postgresql/15
❯ trunk install pg_cron
Using pkglibdir: "/var/lib/postgresql/data/tembo/17/lib"
Using sharedir: "/var/lib/postgresql/data/tembo"
Using Postgres version: 17
info: Downloading from: https://cdb-plat-use1-prod-pgtrunkio.s3.amazonaws.com/extensions/pg_cron/pg_cron-pg17-1.6.4.tar.gz
info: Dependent extensions to be installed: []
info: Installing pg_cron 1.6.4
[+] pg_cron.so => /var/lib/postgresql/data/tembo/17/lib
info: Skipping license file licenses/LICENSE
[+] extension/pg_cron--1.0--1.1.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.0.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.1--1.2.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.2--1.3.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.3--1.4.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.4--1.4-1.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.4-1--1.5.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron--1.5--1.6.sql => /var/lib/postgresql/data/tembo
[+] extension/pg_cron.control => /var/lib/postgresql/data/tembo

***************************
* POST INSTALLATION STEPS *
***************************

Install the following system-level dependencies:
On systems using apt:
libpq5
libc6

Add the following to your postgresql.conf:
shared_preload_libraries = 'pg_cron'

Enable the extension with:
CREATE EXTENSION IF NOT EXISTS pg_cron CASCADE;
```

## Trunk Registry - https://pgt.dev
Expand All @@ -102,7 +136,6 @@ If you're interested in contributing, please open a pull request, issue, or reac
- [Twitter](https://twitter.com/tembo_io)
- Email us at [[email protected]](mailto:[email protected])


Thanks goes to these incredible people:

<a href="https://github.com/tembo-io/trunk/graphs/contributors">
Expand Down
Loading