2026-10-11 07:00:59
This commit is contained in:
1 parent
fc997210bf
commit
ce49d78f31
12 files changed
+54
-11
No files matched your search
@@ -26,6 +26,7 @@ The orchestrator runs the installers in this order:
|
|||||||
6. pg_stat_statements
|
6. pg_stat_statements
|
||||||
7. pg_repack
|
7. pg_repack
|
||||||
8. pg_stat_monitor
|
8. pg_stat_monitor
|
||||||
|
9. pgvector
|
||||||
|
|
||||||
After a successful run, the orchestrator:
|
After a successful run, the orchestrator:
|
||||||
|
|
||||||
@@ -47,9 +48,10 @@ Each component can also be installed independently. The PostgreSQL installation
|
|||||||
./install_pg_stat_statements.sh 18.6
|
./install_pg_stat_statements.sh 18.6
|
||||||
./install_pg_repack.sh 18.6
|
./install_pg_repack.sh 18.6
|
||||||
./install_pg_stat_monitor.sh 18.6
|
./install_pg_stat_monitor.sh 18.6
|
||||||
|
./install_pgvector.sh 18.6
|
||||||
```
|
```
|
||||||
|
|
||||||
`install_postgresql.sh` recreates both the staging directory and the versioned PostgreSQL prefix before downloading sources. Extension installers recreate only the staging directory and preserve the PostgreSQL prefix.
|
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.
|
||||||
|
|
||||||
## Script descriptions
|
## Script descriptions
|
||||||
|
|
||||||
@@ -94,6 +96,10 @@ Builds and installs the `pg_repack` extension and its `pg_repack` command-line u
|
|||||||
|
|
||||||
Builds and installs Percona's `pg_stat_monitor` extension.
|
Builds and installs Percona's `pg_stat_monitor` extension.
|
||||||
|
|
||||||
|
### `install_pgvector.sh`
|
||||||
|
|
||||||
|
Builds and installs pgvector against the selected PostgreSQL installation.
|
||||||
|
|
||||||
### `install_common.sh`
|
### `install_common.sh`
|
||||||
|
|
||||||
Shared helper functions used by the installers, including:
|
Shared helper functions used by the installers, including:
|
||||||
@@ -112,7 +118,7 @@ The following environment variables can override defaults:
|
|||||||
| Variable | Default | Purpose |
|
| Variable | Default | Purpose |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `POSTGRES_ROOT` | `/app/postgres/rdbms` | Root directory for versioned PostgreSQL installations |
|
| `POSTGRES_ROOT` | `/app/postgres/rdbms` | Root directory for versioned PostgreSQL installations |
|
||||||
| `STAGING_DIR` | `/app/staging_area/copilot/tmp` | Temporary source and build directory |
|
| `STAGING_DIR` | `<script directory>/tmp` | Temporary source downloads, extracted source, and build directory |
|
||||||
| `JOBS` | `nproc` result | Parallel build job count |
|
| `JOBS` | `nproc` result | Parallel build job count |
|
||||||
| `CONFIG_FILE` | unset | PostgreSQL configuration file to update |
|
| `CONFIG_FILE` | unset | PostgreSQL configuration file to update |
|
||||||
| `PG_CRON_TAG` | Latest compatible release/tag | pg_cron source tag |
|
| `PG_CRON_TAG` | Latest compatible release/tag | pg_cron source tag |
|
||||||
@@ -121,6 +127,7 @@ The following environment variables can override defaults:
|
|||||||
| `SET_USER_TAG` | Latest release/tag | set_user source tag |
|
| `SET_USER_TAG` | Latest release/tag | set_user source tag |
|
||||||
| `PG_REPACK_TAG` | Latest release/tag | pg_repack source tag |
|
| `PG_REPACK_TAG` | Latest release/tag | pg_repack source tag |
|
||||||
| `PG_STAT_MONITOR_TAG` | Latest release/tag | pg_stat_monitor source tag |
|
| `PG_STAT_MONITOR_TAG` | Latest release/tag | pg_stat_monitor source tag |
|
||||||
|
| `PGVECTOR_TAG` | Latest release/tag | pgvector source tag |
|
||||||
|
|
||||||
Repository variables can also be overridden when using a custom mirror:
|
Repository variables can also be overridden when using a custom mirror:
|
||||||
|
|
||||||
@@ -131,6 +138,7 @@ PGAUDIT_REPOSITORY=owner/repository
|
|||||||
SET_USER_REPOSITORY=owner/repository
|
SET_USER_REPOSITORY=owner/repository
|
||||||
PG_REPACK_REPOSITORY=owner/repository
|
PG_REPACK_REPOSITORY=owner/repository
|
||||||
PG_STAT_MONITOR_REPOSITORY=owner/repository
|
PG_STAT_MONITOR_REPOSITORY=owner/repository
|
||||||
|
PGVECTOR_REPOSITORY=owner/repository
|
||||||
```
|
```
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly PG_CRON_REPOSITORY="${PG_CRON_REPOSITORY:-citusdata/pg_cron}"
|
readonly PG_CRON_REPOSITORY="${PG_CRON_REPOSITORY:-citusdata/pg_cron}"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly PG_REPACK_REPOSITORY="${PG_REPACK_REPOSITORY:-reorg/pg_repack}"
|
readonly PG_REPACK_REPOSITORY="${PG_REPACK_REPOSITORY:-reorg/pg_repack}"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly PG_STAT_MONITOR_REPOSITORY="${PG_STAT_MONITOR_REPOSITORY:-percona/pg_stat_monitor}"
|
readonly PG_STAT_MONITOR_REPOSITORY="${PG_STAT_MONITOR_REPOSITORY:-percona/pg_stat_monitor}"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
|
|
||||||
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
|
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly PGAUDIT_REPOSITORY="${PGAUDIT_REPOSITORY:-pgaudit/pgaudit}"
|
readonly PGAUDIT_REPOSITORY="${PGAUDIT_REPOSITORY:-pgaudit/pgaudit}"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
# shellcheck source=install_common.sh
|
||||||
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
|
readonly PGVECTOR_REPOSITORY="${PGVECTOR_REPOSITORY:-pgvector/pgvector}"
|
||||||
|
|
||||||
|
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
|
||||||
|
readonly POSTGRES_VERSION="$1"
|
||||||
|
validate_postgresql_version "$POSTGRES_VERSION"
|
||||||
|
require_tools curl tar make
|
||||||
|
readonly PREFIX="$POSTGRES_ROOT/$POSTGRES_VERSION"
|
||||||
|
readonly PG_CONFIG="$PREFIX/bin/pg_config"
|
||||||
|
require_postgresql_installation "$PREFIX"
|
||||||
|
reset_staging_dir "$STAGING_DIR"
|
||||||
|
|
||||||
|
readonly PGVECTOR_TAG="${PGVECTOR_TAG:-$(latest_tag "$PGVECTOR_REPOSITORY")}"
|
||||||
|
[[ -n "$PGVECTOR_TAG" ]] || die "could not determine the latest pgvector release"
|
||||||
|
readonly PGVECTOR_VERSION="${PGVECTOR_TAG#v}"
|
||||||
|
readonly PGVECTOR_DIR="$STAGING_DIR/pgvector-$PGVECTOR_VERSION"
|
||||||
|
|
||||||
|
printf 'Building pgvector %s\n' "$PGVECTOR_TAG"
|
||||||
|
download_source "$STAGING_DIR" "$PGVECTOR_REPOSITORY" "$PGVECTOR_TAG" \
|
||||||
|
"pgvector-$PGVECTOR_VERSION.tar.gz" "$PGVECTOR_DIR"
|
||||||
|
cd "$PGVECTOR_DIR"
|
||||||
|
make -j"${JOBS:-$(nproc)}" PG_CONFIG="$PG_CONFIG"
|
||||||
|
make install PG_CONFIG="$PG_CONFIG"
|
||||||
|
test -f "$PREFIX/lib/vector.so"
|
||||||
|
test -f "$PREFIX/share/extension/vector.control"
|
||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
|
|
||||||
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
|
[[ $# -eq 1 ]] || die "Usage: $0 <postgresql-version>"
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ printf 'Invocation directory: %s\n' "$INVOCATION_DIR"
|
|||||||
"$SCRIPT_DIR/install_pg_stat_statements.sh" "$POSTGRES_VERSION"
|
"$SCRIPT_DIR/install_pg_stat_statements.sh" "$POSTGRES_VERSION"
|
||||||
"$SCRIPT_DIR/install_pg_repack.sh" "$POSTGRES_VERSION"
|
"$SCRIPT_DIR/install_pg_repack.sh" "$POSTGRES_VERSION"
|
||||||
"$SCRIPT_DIR/install_pg_stat_monitor.sh" "$POSTGRES_VERSION"
|
"$SCRIPT_DIR/install_pg_stat_monitor.sh" "$POSTGRES_VERSION"
|
||||||
|
"$SCRIPT_DIR/install_pgvector.sh" "$POSTGRES_VERSION"
|
||||||
|
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly PREFIX="$POSTGRES_ROOT/$POSTGRES_VERSION"
|
readonly PREFIX="$POSTGRES_ROOT/$POSTGRES_VERSION"
|
||||||
@@ -80,6 +81,7 @@ printf ' set_user: %s\n' "$(extension_version set_user)"
|
|||||||
printf ' pg_stat_statements: %s\n' "$(extension_version pg_stat_statements)"
|
printf ' pg_stat_statements: %s\n' "$(extension_version pg_stat_statements)"
|
||||||
printf ' pg_repack: %s\n' "$(extension_version pg_repack)"
|
printf ' pg_repack: %s\n' "$(extension_version pg_repack)"
|
||||||
printf ' pg_stat_monitor: %s\n' "$(extension_version pg_stat_monitor)"
|
printf ' pg_stat_monitor: %s\n' "$(extension_version pg_stat_monitor)"
|
||||||
|
printf ' pgvector: %s\n' "$(extension_version vector)"
|
||||||
printf " shared_preload_libraries = '%s'\n" "$SHARED_PRELOAD_LIBRARIES"
|
printf " shared_preload_libraries = '%s'\n" "$SHARED_PRELOAD_LIBRARIES"
|
||||||
|
|
||||||
rm -f -- "$ENGINE_ARCHIVE"
|
rm -f -- "$ENGINE_ARCHIVE"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly SET_USER_REPOSITORY="${SET_USER_REPOSITORY:-pgaudit/set_user}"
|
readonly SET_USER_REPOSITORY="${SET_USER_REPOSITORY:-pgaudit/set_user}"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
# shellcheck source=install_common.sh
|
# shellcheck source=install_common.sh
|
||||||
source "$SCRIPT_DIR/install_common.sh"
|
source "$SCRIPT_DIR/install_common.sh"
|
||||||
|
|
||||||
readonly STAGING_DIR="${STAGING_DIR:-/app/staging_area/copilot/tmp}"
|
readonly STAGING_DIR="${STAGING_DIR:-$SCRIPT_DIR/tmp}"
|
||||||
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
readonly POSTGRES_ROOT="${POSTGRES_ROOT:-/app/postgres/rdbms}"
|
||||||
readonly TIMESCALEDB_REPOSITORY="${TIMESCALEDB_REPOSITORY:-timescale/timescaledb}"
|
readonly TIMESCALEDB_REPOSITORY="${TIMESCALEDB_REPOSITORY:-timescale/timescaledb}"
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
copilot --resume=810fde45-db5c-4a88-8abf-550ae7a485e4
|
|
||||||
Reference in new issue
Block a user