Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
91da84a
feat: add pg_repack container image
thomasboussekey Apr 2, 2026
c0a2cad
Merging
thomasboussekey Apr 2, 2026
ce7d19d
docs: add README part for pg_repack
thomasboussekey Apr 2, 2026
d8e79be
Merge branch 'main' into dev/pg_repack
thomasboussekey Apr 2, 2026
3f0f985
chore: add entries in bake.yml
thomasboussekey Apr 2, 2026
3418f3b
Merge branch 'dev/pg_repack' of github.com:thomasboussekey/postgres-e…
thomasboussekey Apr 2, 2026
dc8601b
fix: add missing variable in metadata.hcl
thomasboussekey Apr 2, 2026
0f6acaa
fix: uncomment useful lines in Dockerfile
thomasboussekey Apr 2, 2026
27e4240
rebase
thomasboussekey May 7, 2026
44969f8
chore(deps): update registry docker tag to v3.1.0 (#178)
renovate[bot] Apr 13, 2026
e0e02fc
chore(deps): update alpine/kubectl:1.35.3 docker digest to c4a11ae (#…
renovate[bot] Apr 13, 2026
c064220
fix: allow UpdateOSLibs to handle packages without an MD5Sum (#164)
NiccoloFei Apr 15, 2026
d79e752
fix(PostGIS): pin the version of the scripts package (#186)
NiccoloFei Apr 17, 2026
c70f8d2
chore: update postgis OS libraries (#151)
cnpg-bot Apr 20, 2026
8fa65fa
chore: update dagger modules with security fixes (#191)
sxd Apr 20, 2026
82a5790
chore(deps): update all github action (#176)
renovate[bot] Apr 20, 2026
d36a15c
chore: update go dependencies of Dagger module maintenance (#192)
sxd Apr 20, 2026
79dcdd8
chore(deps): update alpine/kubectl docker tag to v1.35.4 (#190)
renovate[bot] Apr 20, 2026
d1e9842
chore(deps): update dependency postgresql-18-postgis-3 (#183)
renovate[bot] Apr 21, 2026
450d27c
ci: avoid triggering CI for all extensions on non-impactful shared fi…
NiccoloFei Apr 23, 2026
a41a3e5
chore: enable Renovate's auto-merge (#196)
NiccoloFei Apr 28, 2026
27b13f8
chore(deps): update sigstore/cosign-installer action to v4 (#188)
renovate[bot] Apr 29, 2026
6e58a0d
Merge branch 'dev/pg_repack' of github.com:thomasboussekey/postgres-e…
thomasboussekey May 7, 2026
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ they are maintained by their respective authors, and PostgreSQL Debian Group
| :--- | :--- | :--- |
| **[pgAudit](pgaudit)** | PostgreSQL audit extension | [github.com/pgaudit/pgaudit](https://github.com/pgaudit/pgaudit) |
| **[pg_crash](pg-crash)** | **Disruptive** fault injection and chaos engineering extension | [github.com/cybertec-postgresql/pg_crash](https://github.com/cybertec-postgresql/pg_crash) |
| **[pg_repack](pgrepack)** | re-organize bloated tables and indexes | [github.com/reorg/pg_repack](https://github.com/reorg/pg_repack) |
| **[pgvector](pgvector)** | Vector similarity search for PostgreSQL | [github.com/pgvector/pgvector](https://github.com/pgvector/pgvector) |
| **[PostGIS](postgis)** | Geospatial database extension for PostgreSQL | [postgis.net/](https://postgis.net/) |


Extensions are provided only for the OS versions already built by the
[`cloudnative-pg/postgres-containers`](https://github.com/cloudnative-pg/postgres-containers) project,
specifically Debian `stable` and `oldstable`.
Expand Down
36 changes: 36 additions & 0 deletions pgrepack/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-FileCopyrightText: Copyright © contributors to CloudNativePG, established as CloudNativePG a Series of LF Projects, LLC.
# SPDX-License-Identifier: Apache-2.0


ARG BASE=ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie
FROM $BASE AS builder

ARG PG_MAJOR
ARG EXT_VERSION

USER 0

# TODO: Remove this comment block after customizing the Dockerfile
# Instructions:
# 1. Remove all TODO comment blocks after completing the customization.
# 2. Uncomment and customize the COPY/RUN commands below.
# 3. If your extension requires additional system libraries, ensure they are
# copied to /lib.

# Install extension via `apt-get`
RUN apt-get update && apt-get install -y --no-install-recommends \
"postgresql-${PG_MAJOR}-repack=${EXT_VERSION}"

FROM scratch
ARG PG_MAJOR

# Licenses
COPY --from=builder /usr/share/doc/postgresql-${PG_MAJOR}-repack/copyright /licenses/postgresql-${PG_MAJOR}-repack/

# Libraries
COPY --from=builder /usr/lib/postgresql/${PG_MAJOR}/lib/pg_repack* /lib/

# Share
COPY --from=builder /usr/share/postgresql/${PG_MAJOR}/extension/pg_repack* /share/extension/

USER 65532:65532
111 changes: 111 additions & 0 deletions pgrepack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Pg_repack
<!--
SPDX-FileCopyrightText: Copyright © contributors to CloudNativePG, established as CloudNativePG a Series of LF Projects, LLC.
SPDX-License-Identifier: Apache-2.0
-->

<!--
TODO: Replace this section with a brief introduction of your extension.
Describe what the extension does and what it is useful for.
Add a reference to the official documentation if available.
-->

The pg_repack PostgreSQL extension provides a binary tool that can perform online operation that can remove bloat from tables and indexes. For more information, see the [official documentation](https://reorg.github.io/pg_repack/).

## Usage

<!--
Usage: add instructions on how to use the extension with CloudNativePG.
Include code snippets for Cluster and Database resources as needed.
-->

### 1. Add the pg_repack extension image to your Cluster

Define the `pg_repack` extension under the `postgresql.extensions` section of
your `Cluster` resource. For example:

```yaml
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: cluster-pg_repack
spec:
imageName: ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie
instances: 1

storage:
size: 1Gi

postgresql:
extensions:
- name: pg_repack
image:
# renovate: suite=trixie-pgdg depName=postgresql-18-pg_repack
reference: ghcr.io/cloudnative-pg/pg_repack:1.0-18-trixie
```

### 2. Enable the extension in a database

You can install `pg_repack` in a specific database by creating or updating a
`Database` resource. For example, to enable it in the `app` database:

```yaml
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: cluster-pg_repack-app
spec:
name: app
owner: app
cluster:
name: cluster-pg_repack
extensions:
- name: pg_repack
# renovate: suite=trixie-pgdg depName=postgresql-18-pg_repack extractVersion=^(?<version>\d+\.\d+\.\d+)
version: '1.0'
```

<!--
TODO: Adjust the extractVersion regex pattern above based on your extension's versioning scheme
Examples: \d+\.\d+ for major.minor (e.g., "18.0"), \d+\.\d+\.\d+ for major.minor.patch (e.g., "0.8.2")
-->

### 3. Verify installation

Once the database is ready, connect to it with `psql` and run:

```sql
\dx
```

You should see `pg_repack` listed among the installed extensions.

## Contributors

This extension is maintained by:

- FirstName LastName (@GitHub_Handle)

The maintainers are responsible for:

- Monitoring upstream releases and security vulnerabilities.
- Ensuring compatibility with supported PostgreSQL versions.
- Reviewing and merging contributions specific to this extension's container
image and lifecycle.

---

## Licenses and Copyright

This container image contains software that may be licensed under various
open-source licenses.

All relevant license and copyright information for the `pg_repack` extension
and its dependencies are bundled within the image at:

```text
/licenses/
```

By using this image, you agree to comply with the terms of the licenses
contained therein.
41 changes: 41 additions & 0 deletions pgrepack/metadata.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: Copyright © contributors to CloudNativePG, established as CloudNativePG a Series of LF Projects, LLC.
# SPDX-License-Identifier: Apache-2.0
metadata = {
name = "pgrepack"
sql_name = "pg_repack"
image_name = "pgrepack"
licenses = ["BSD-3-Clause"]
shared_preload_libraries = ["pg_repack"]
extension_control_path = []
dynamic_library_path = []
ld_library_path = []
bin_path = []
auto_update_os_libs = false
required_extensions = []
create_extension = true

# TODO: Add these missing variables in the template
env = {}
postgresql_parameters = {}

versions = {
trixie = {
"18" = {
// renovate: suite=trixie-pgdg depName=postgresql-18-pg_repack
package = "1.5.3-1.pgdg13+1"
// Examples: \d+\.\d+ for major.minor (e.g., "18.0"), \d+\.\d+\.\d+ for major.minor.patch (e.g., "0.8.2")
// renovate: suite=trixie-pgdg depName=postgresql-18-pg_repack extractVersion=^(?<version>\d+\.\d+\.\d+)
sql = "1.5.3"
}
}
bookworm = {
"18" = {
// renovate: suite=bookworm-pgdg depName=postgresql-18-pg_repack
package = "1.5.3-1.pgdg12+1"
// Examples: \d+\.\d+ for major.minor (e.g., "18.0"), \d+\.\d+\.\d+ for major.minor.patch (e.g., "0.8.2")
// renovate: suite=bookworm-pgdg depName=postgresql-18-pg_repack extractVersion=^(?<version>\d+\.\d+\.\d+)
sql = "1.5.3"
}
}
}
}