Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The complete list of available properties can be found in the [spec](jobs/postgr

Property | Description
-------- | -------------
databases.version | Define the used PostgreSQL major version. Default: 16
databases.version | Define the used PostgreSQL major version. Default: 18. Supported versions: 13, 15, 16, 17, 18
databases.port | The database port. Default: 5432
databases.databases | A list of databases and associated properties to create when Postgres starts
databases.databases[n].name | Database name
Expand Down
22 changes: 22 additions & 0 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
trigger: true
- get: postgres-17-src
trigger: true
- get: postgres-18-src
trigger: true
- get: yq-release
trigger: true
params:
Expand Down Expand Up @@ -91,6 +93,18 @@ jobs:
options:
access_key_id: ((postgres-release-blobstore-user.username))
secret_access_key: ((postgres-release-blobstore-user.password))
- task: bump-postgres-18-package
file: postgres-release/ci/tasks/bump-postgres-packages/task.yml
image: bosh-cli-registry-image
input_mapping:
postgres-src: postgres-18-src
params:
MAJOR_VERSION: 18
PRIVATE_YML: |
blobstore:
options:
access_key_id: ((postgres-release-blobstore-user.username))
secret_access_key: ((postgres-release-blobstore-user.password))
- task: bump-yq-package
file: postgres-release/ci/tasks/bump-yq-packages/task.yml
image: bosh-integration-image
Expand Down Expand Up @@ -155,6 +169,7 @@ jobs:
- postgresql-15
- postgresql-16
- postgresql-17
- postgresql-18
- yq
on_success:
do:
Expand Down Expand Up @@ -313,6 +328,13 @@ resources:
regex: 'href="v(?P<version>17\.[0-9.]+)/"'
uri: "https://ftp.postgresql.org/pub/source/v{version}/postgresql-{version}.tar.gz"

- name: postgres-18-src
type: http-resource
source:
index: "https://ftp.postgresql.org/pub/source/"
regex: 'href="v(?P<version>18\.[0-9.]+)/"'
uri: "https://ftp.postgresql.org/pub/source/v{version}/postgresql-{version}.tar.gz"

- name: yq-release
type: github-release
source:
Expand Down
5 changes: 3 additions & 2 deletions jobs/bbr-postgres-db/spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ packages:
- postgres-15
- postgres-16
- postgres-17
- postgres-18

consumes:
- name: database
Expand Down Expand Up @@ -50,5 +51,5 @@ properties:
default: false
description: "uses singele transaction when restoring databases"
postgres.version:
description: "The database version e.g. 11, 13, 15, 16 or 17"
default: 16
description: "The database version e.g. 11, 13, 15, 16, 17 or 18"
default: 18
5 changes: 3 additions & 2 deletions jobs/postgres/spec
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packages:
- postgres-15
- postgres-16
- postgres-17
- postgres-18
- postgres-yq-4

provides:
Expand All @@ -45,8 +46,8 @@ provides:

properties:
databases.version:
description: "The database version e.g. 11, 13, 15, 16 or 17"
default: 16
description: "The database version e.g. 13, 15, 16, 17 or 18"
default: 18
databases.port:
description: "The database port"
default: 5432
Expand Down
4 changes: 3 additions & 1 deletion jobs/postgres/templates/used_postgresql_versions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
postgresql:
default: 16
default: 18
major_version:
16:
minor_version: "16.13"
Expand All @@ -11,3 +11,5 @@ postgresql:
minor_version: "11.22"
17:
minor_version: "17.9"
18:
minor_version: "18.2"
49 changes: 49 additions & 0 deletions packages/postgres-18/packaging
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash -exu

function main() {
extract_archive
compile

}

function extract_archive() {

echo "Extracting archive..."
tar xzf postgres/postgresql-*

}

function compile() {

pushd postgresql-* > /dev/null
if [[ "$(uname -a)" =~ "x86_64" || "$(uname -a)" =~ "ppc64le" ]] ; then
ICU_CFLAGS=" " ICU_LIBS="-L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata" ./configure --prefix="${BOSH_INSTALL_TARGET}" --with-openssl
else
ICU_CFLAGS=" " ICU_LIBS="-L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata" CFLAGS=-m32 LDFLAGS=-m32 CXXFLAGS=-m32 ./configure --prefix="${BOSH_INSTALL_TARGET}" --with-openssl
fi

pushd src/bin/pg_config > /dev/null
make -j$(nproc)
make install
popd > /dev/null

cp -LR src/include "${BOSH_INSTALL_TARGET}"
pushd src/interfaces/libpq > /dev/null
make -j$(nproc)
make install
popd > /dev/null

pushd src > /dev/null
make -j$(nproc)
make install
popd > /dev/null

pushd contrib > /dev/null
make -j$(nproc)
make install
popd > /dev/null
popd > /dev/null
}

main

5 changes: 5 additions & 0 deletions packages/postgres-18/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: postgres-18
files:
- postgres/postgresql-18.*.tar.gz