Update PG version in a couple of places (#2986)

* All dockerfiles to use PG16 by default
* PGVERSION env in the test pipelines to 16.1-1 by default
* 11->14 in the dcs-pg mapping for test pipelines
* Code comments fixes
This commit is contained in:
Polina Bungina
2023-12-18 10:44:05 +01:00
committed by GitHub
parent f0719d148c
commit c1ee99d81d
9 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ def install_etcd():
def install_postgres(): def install_postgres():
version = os.environ.get('PGVERSION', '15.1-1') version = os.environ.get('PGVERSION', '16.1-1')
platform = {'darwin': 'osx', 'win32': 'windows-x64', 'cygwin': 'windows-x64'}[sys.platform] platform = {'darwin': 'osx', 'win32': 'windows-x64', 'cygwin': 'windows-x64'}[sys.platform]
if platform == 'osx': if platform == 'osx':
return subprocess.call(['brew', 'install', 'expect', 'postgresql@{0}'.format(version.split('.')[0])]) return subprocess.call(['brew', 'install', 'expect', 'postgresql@{0}'.format(version.split('.')[0])])
+1 -1
View File
@@ -1 +1 @@
versions = {'etcd': '9.6', 'etcd3': '16', 'consul': '13', 'exhibitor': '12', 'raft': '11', 'kubernetes': '15'} versions = {'etcd': '9.6', 'etcd3': '16', 'consul': '13', 'exhibitor': '12', 'raft': '14', 'kubernetes': '15'}
+1 -1
View File
@@ -30,7 +30,7 @@ def main():
unbuffer = ['timeout', '900', 'unbuffer'] unbuffer = ['timeout', '900', 'unbuffer']
else: else:
if sys.platform == 'darwin': if sys.platform == 'darwin':
version = os.environ.get('PGVERSION', '15.1-1') version = os.environ.get('PGVERSION', '16.1-1')
path = '/usr/local/opt/postgresql@{0}/bin:.'.format(version.split('.')[0]) path = '/usr/local/opt/postgresql@{0}/bin:.'.format(version.split('.')[0])
unbuffer = ['unbuffer'] unbuffer = ['unbuffer']
else: else:
+1 -1
View File
@@ -85,7 +85,7 @@ jobs:
env: env:
DCS: ${{ matrix.dcs }} DCS: ${{ matrix.dcs }}
ETCDVERSION: 3.4.23 ETCDVERSION: 3.4.23
PGVERSION: 15.1-1 # for windows and macos PGVERSION: 16.1-1 # for windows and macos
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
+1 -1
View File
@@ -1,6 +1,6 @@
## This Dockerfile is meant to aid in the building and debugging patroni whilst developing on your local machine ## This Dockerfile is meant to aid in the building and debugging patroni whilst developing on your local machine
## It has all the necessary components to play/debug with a single node appliance, running etcd ## It has all the necessary components to play/debug with a single node appliance, running etcd
ARG PG_MAJOR=15 ARG PG_MAJOR=16
ARG COMPRESS=false ARG COMPRESS=false
ARG PGHOME=/home/postgres ARG PGHOME=/home/postgres
ARG PGDATA=$PGHOME/data ARG PGDATA=$PGHOME/data
+2 -2
View File
@@ -1,6 +1,6 @@
## This Dockerfile is meant to aid in the building and debugging patroni whilst developing on your local machine ## This Dockerfile is meant to aid in the building and debugging patroni whilst developing on your local machine
## It has all the necessary components to play/debug with a single node appliance, running etcd ## It has all the necessary components to play/debug with a single node appliance, running etcd
ARG PG_MAJOR=15 ARG PG_MAJOR=16
ARG COMPRESS=false ARG COMPRESS=false
ARG PGHOME=/home/postgres ARG PGHOME=/home/postgres
ARG PGDATA=$PGHOME/data ARG PGDATA=$PGHOME/data
@@ -40,7 +40,7 @@ RUN set -ex \
echo "deb [signed-by=/etc/apt/trusted.gpg.d/citusdata_community.gpg] https://packagecloud.io/citusdata/community/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/citusdata_community.list \ echo "deb [signed-by=/etc/apt/trusted.gpg.d/citusdata_community.gpg] https://packagecloud.io/citusdata/community/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/citusdata_community.list \
&& curl -sL https://packagecloud.io/citusdata/community/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/citusdata_community.gpg \ && curl -sL https://packagecloud.io/citusdata/community/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/citusdata_community.gpg \
&& apt-get update -y \ && apt-get update -y \
&& apt-get -y install postgresql-$PG_MAJOR-citus-11.3; \ && apt-get -y install postgresql-$PG_MAJOR-citus-12.1; \
fi \ fi \
\ \
# Cleanup all locales but en_US.UTF-8 # Cleanup all locales but en_US.UTF-8
+1 -1
View File
@@ -1,4 +1,4 @@
FROM postgres:15 FROM postgres:16
LABEL maintainer="Alexander Kukushkin <[email protected]>" LABEL maintainer="Alexander Kukushkin <[email protected]>"
RUN export DEBIAN_FRONTEND=noninteractive \ RUN export DEBIAN_FRONTEND=noninteractive \
+4 -4
View File
@@ -1,4 +1,4 @@
FROM postgres:15 FROM postgres:16
LABEL maintainer="Alexander Kukushkin <[email protected]>" LABEL maintainer="Alexander Kukushkin <[email protected]>"
RUN export DEBIAN_FRONTEND=noninteractive \ RUN export DEBIAN_FRONTEND=noninteractive \
@@ -11,7 +11,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
## Make sure we have a en_US.UTF-8 locale available ## Make sure we have a en_US.UTF-8 locale available
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& if [ $(dpkg --print-architecture) = 'arm64' ]; then \ && if [ $(dpkg --print-architecture) = 'arm64' ]; then \
apt-get install -y postgresql-server-dev-15 \ apt-get install -y postgresql-server-dev-16 \
gcc make autoconf \ gcc make autoconf \
libc6-dev flex libcurl4-gnutls-dev \ libc6-dev flex libcurl4-gnutls-dev \
libicu-dev libkrb5-dev liblz4-dev \ libicu-dev libkrb5-dev liblz4-dev \
@@ -24,7 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
echo "deb [signed-by=/etc/apt/trusted.gpg.d/citusdata_community.gpg] https://packagecloud.io/citusdata/community/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/citusdata_community.list \ echo "deb [signed-by=/etc/apt/trusted.gpg.d/citusdata_community.gpg] https://packagecloud.io/citusdata/community/debian/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/citusdata_community.list \
&& curl -sL https://packagecloud.io/citusdata/community/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/citusdata_community.gpg \ && curl -sL https://packagecloud.io/citusdata/community/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/citusdata_community.gpg \
&& apt-get update -y \ && apt-get update -y \
&& apt-get -y install postgresql-15-citus-12.0; \ && apt-get -y install postgresql-16-citus-12.1; \
fi \ fi \
&& pip3 install --break-system-packages setuptools \ && pip3 install --break-system-packages setuptools \
&& pip3 install --break-system-packages 'git+https://github.com/zalando/patroni.git#egg=patroni[kubernetes]' \ && pip3 install --break-system-packages 'git+https://github.com/zalando/patroni.git#egg=patroni[kubernetes]' \
@@ -38,7 +38,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& chmod 664 /etc/passwd \ && chmod 664 /etc/passwd \
# Clean up # Clean up
&& apt-get remove -y git python3-pip python3-wheel \ && apt-get remove -y git python3-pip python3-wheel \
postgresql-server-dev-15 gcc make autoconf \ postgresql-server-dev-16 gcc make autoconf \
libc6-dev flex libicu-dev libkrb5-dev liblz4-dev \ libc6-dev flex libicu-dev libkrb5-dev liblz4-dev \
libpam0g-dev libreadline-dev libselinux1-dev libssl-dev libxslt1-dev libzstd-dev uuid-dev \ libpam0g-dev libreadline-dev libselinux1-dev libssl-dev libxslt1-dev libzstd-dev uuid-dev \
&& apt-get autoremove -y \ && apt-get autoremove -y \
+1 -1
View File
@@ -176,7 +176,7 @@ class PostmasterProcess(psutil.Process):
return not self.is_running() return not self.is_running()
def wait_for_user_backends_to_close(self, stop_timeout: Optional[float]) -> None: def wait_for_user_backends_to_close(self, stop_timeout: Optional[float]) -> None:
# These regexps are cross checked against versions PostgreSQL 9.1 .. 15 # These regexps are cross checked against versions PostgreSQL 9.1 .. 16
aux_proc_re = re.compile("(?:postgres:)( .*:)? (?:(?:archiver|startup|autovacuum launcher|autovacuum worker|" aux_proc_re = re.compile("(?:postgres:)( .*:)? (?:(?:archiver|startup|autovacuum launcher|autovacuum worker|"
"checkpointer|logger|stats collector|wal receiver|wal writer|writer)(?: process )?|" "checkpointer|logger|stats collector|wal receiver|wal writer|writer)(?: process )?|"
"walreceiver|wal sender process|walsender|walwriter|background writer|" "walreceiver|wal sender process|walsender|walwriter|background writer|"