2026-10-11 14:45:57

This commit is contained in:
support committed 2026-10-11 16:45:57 +02:00
1 parent ce49d78f31
commit fbf826bf0c
12 files changed
+512 -57

No files matched your search

+44 -11
View File
@@ -16,6 +16,23 @@ Run the orchestrator with the PostgreSQL version to install:
./install_postgresql_extensions.sh 18.6
```
The version may also be supplied explicitly with `-v` or `--version`:
```bash
./install_postgresql_extensions.sh --version 18.6
```
The orchestrator accepts a custom installation prefix and PostgreSQL `configure` options:
```bash
./install_postgresql_extensions.sh \
--version 18.6 \
--prefix /app/postgres/rdbms/18.6 \
--options="--with-ssl=openssl,--with-lz4"
```
`-p`/`--prefix` defaults to `/app/postgres/rdbms/<version>`. `-o`/`--options` accepts a comma-separated list of `configure` arguments; if omitted, the defaults are `--with-ssl=openssl,--with-lz4`. The prefix is passed to all component installers. If the selected prefix already exists, the orchestrator asks whether to recreate it; the prompt defaults to No, and non-interactive runs cancel safely.
The orchestrator runs the installers in this order:
1. PostgreSQL
@@ -32,27 +49,41 @@ After a successful run, the orchestrator:
- Optionally updates `shared_preload_libraries` when `CONFIG_FILE` is set.
- Prints the installed PostgreSQL and extension versions.
- Creates `postgresql-<version>-engine.tar.gz` in the directory from which the command was launched.
- Recreates `sources/<complete-version>/` before starting, where `<complete-version>` is the final directory name of the selected prefix (for example, prefix `/app/postgres/rdbms/18.6.3` uses `sources/18.6.3/`). Each successfully installed component's source tree is saved there with an executable `install_<postgresql-version>.sh` recipe containing that component's configure/build/install commands.
- Creates `postgresql-<prefix-basename>-engine.tar.gz` in the directory from which the command was launched (for example, a prefix ending in `18.6.3` produces `postgresql-18.6.3-engine.tar.gz`).
- Writes the complete process log to `postgresql-<version>-process.log` in that same directory.
- Prints and logs the total execution duration in hours, minutes, and seconds.
## Individual installers
Each component can also be installed independently. The PostgreSQL installation must already exist before running an extension installer.
```bash
./install_postgresql.sh 18.6
./install_pg_cron.sh 18.6
./install_timescaledb.sh 18.6
./install_pgaudit.sh 18.6
./install_set_user.sh 18.6
./install_pg_stat_statements.sh 18.6
./install_pg_repack.sh 18.6
./install_pg_stat_monitor.sh 18.6
./install_pgvector.sh 18.6
./install_postgresql.sh --version 18.6
./install_pg_cron.sh --version 18.6
./install_timescaledb.sh --version 18.6
./install_pgaudit.sh --version 18.6
./install_set_user.sh --version 18.6
./install_pg_stat_statements.sh --version 18.6
./install_pg_repack.sh --version 18.6
./install_pg_stat_monitor.sh --version 18.6
./install_pgvector.sh --version 18.6
```
Each installer also accepts `-v 18.6` and the previous positional form (`./install_pg_cron.sh 18.6`). The all-in-one orchestrator passes its complete `--version` value to every component installer.
All source downloads, extracted source trees, and build workspaces use the `tmp/` directory alongside the scripts by default. `install_postgresql.sh` recreates that staging directory and the versioned PostgreSQL prefix before downloading sources. Each extension installer recreates only the staging directory and preserves the PostgreSQL prefix.
When the main orchestrator is invoked without `--help` or `-h`, it first recreates `tmp/` alongside the scripts. Help mode prints usage only and does not create, delete, or modify files.
Every installer accepts `--help` or `-h`, for example:
```bash
./install_pgvector.sh --help
```
The generated `install_<version>.sh` recipes also accept `--help`/`-h` and can be run from their saved component source directory to repeat that component's configure/build/install steps.
## Script descriptions
### `install_postgresql_extensions.sh`
@@ -61,7 +92,7 @@ All-in-one entry point. It invokes every installer, applies optional configurati
### `install_postgresql.sh`
Downloads, configures, builds, and installs PostgreSQL. The build uses:
Downloads, configures, builds, and installs PostgreSQL. By default, `configure` uses:
```text
--with-ssl=openssl
@@ -118,6 +149,8 @@ The following environment variables can override defaults:
| Variable | Default | Purpose |
| --- | --- | --- |
| `POSTGRES_ROOT` | `/app/postgres/rdbms` | Root directory for versioned PostgreSQL installations |
| `-p`, `--prefix` | `/app/postgres/rdbms/<version>` | Exact PostgreSQL installation prefix |
| `-o`, `--options` | `--with-ssl=openssl,--with-lz4` | Comma-separated PostgreSQL `configure` options |
| `STAGING_DIR` | `<script directory>/tmp` | Temporary source downloads, extracted source, and build directory |
| `JOBS` | `nproc` result | Parallel build job count |
| `CONFIG_FILE` | unset | PostgreSQL configuration file to update |