Skip to content
Draft
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
36 changes: 0 additions & 36 deletions ansible/files/postgres_prestart.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@ log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
}

check_orioledb_enabled() {
local pg_conf="/etc/postgresql/postgresql.conf"
if [ ! -f "$pg_conf" ]; then
return 0
fi
grep "^shared_preload_libraries" "$pg_conf" | grep -c "orioledb" || return 0
}

get_shared_buffers() {
local opt_conf="/etc/postgresql-custom/generated-optimizations.conf"
if [ ! -f "$opt_conf" ]; then
return 0
fi
grep "^shared_buffers = " "$opt_conf" | cut -d "=" -f2 | tr -d ' ' || return 0
}

update_orioledb_buffers() {
local pg_conf="/etc/postgresql/postgresql.conf"
local value="$1"
if grep -q "^orioledb.main_buffers = " "$pg_conf"; then
sed -i "s/^orioledb.main_buffers = .*/orioledb.main_buffers = $value/" "$pg_conf"
else
echo "orioledb.main_buffers = $value" >> "$pg_conf"
fi
}

check_extensions_file() {
local extensions_file="/etc/adminapi/pg-extensions.json"
if [ ! -f "$extensions_file" ]; then
Expand Down Expand Up @@ -112,16 +86,6 @@ main() {
# 1. Handle all extension versions from config file
handle_extension_versions

# 2. orioledb handling
local has_orioledb=$(check_orioledb_enabled)
if [ "$has_orioledb" -lt 1 ]; then
return 0
fi
local shared_buffers_value=$(get_shared_buffers)
if [ ! -z "$shared_buffers_value" ]; then
update_orioledb_buffers "$shared_buffers_value"
fi

log "Prestart script completed"
}

Expand Down
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ postgres_major:
# This is the source of truth for Postgres versions used in the Dockerfiles, and
# is used to derive image tags and base images in the release matrix.
postgres_release:
postgresorioledb-17: "17.9.0.015-orioledb"
postgres17: "17.6.1.162"
postgres15: "15.14.1.162"
postgresorioledb-17: "17.9.0.016-orioledb-bench-1"
postgres17: "17.6.1.163-bench-1"
postgres15: "15.14.1.163-bench-1"
# Docker release matrix — base images built first, layered images built on top.
# tag and base_tag are derived at build time from postgres_release via release_key.
# tag_suffix is appended to the release version to form the final image tag.
Expand Down
3 changes: 2 additions & 1 deletion nix/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ in
orioledb = {
"17" = {
version = "17_20";
hash = "sha256-HDrHTx9yeIPJoyIBs+BdAhBQqt1IEtQrG9pFfvHJqdg=";
revision = "1e13fa1993dd9b1b867e6362c1f1930849e8be7b";
hash = "sha256-AZkxvEJnD0FTDlbnfryQCsshw4Buwoev60WtAwmgcDA=";
};
};
};
Expand Down
8 changes: 4 additions & 4 deletions nix/ext/orioledb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "orioledb";
repo = "orioledb";
rev = "beta16";
sha256 = "sha256-HCfNzMPt80nGeVwlstUCeMpdNZYd9KhLLHYyD/Hvuhk=";
rev = "94e1d3c9a873fb7c132d4683cce0753f7f08142c";
sha256 = "sha256-hxUU8H9PEpEhBuRCh/yvjjSmONnMKTstlQB/pK7Sc1s=";
};
version = "beta16";
version = "94e1d3c9a873fb7c132d4683cce0753f7f08142c";
buildInputs = [
curl
libkrb5
Expand All @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
openssl
];
buildPhase = ''
make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=20
make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=1e13fa1993dd9b1b867e6362c1f1930849e8be7b
'';
installPhase = ''
runHook preInstall
Expand Down
Loading