Skip to content

Commit 4fd888f

Browse files
author
Jonathan S. Katz
committed
Make PostgreSQL 12 the default supported version of PostgreSQL.
This ensures that the "single repo" containers pull from the PostgreSQL 12 repository. [ch6302]
1 parent a21587a commit 4fd888f

34 files changed

+85
-90
lines changed

apiserver/backupoptions/pgdumpoptions.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ type pgDumpOptions struct {
5757
LockWaitTimeout string `flag:"lock-wait-timeout"`
5858
LoadViaPartitionRoot bool `flag:"load-via-partition-root"`
5959
NoComments bool `flag:"no-comments"`
60-
NoPublications bool `flag:"no-publications"` // PG 10 & 11 only
60+
NoPublications bool `flag:"no-publications"` // PG 10+
6161
NoSecurityLabels bool `flag:"no-security-labels"`
62-
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10 & 11 only
62+
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10+
6363
NoSync bool `flag:"no-sync"`
6464
NoTableSpaces bool `flag:"no-tablespaces"`
6565
NoUnloggedTableData bool `flag:"no-unlogged-table-data"`
6666
QuoteAllIdentifiers bool `flag:"quote-all-identifiers"`
6767
Section []string `flag:"section"`
6868
SerializableDeferrable bool `flag:"serializable-deferrable"`
6969
Snapshot string `flag:"snapshot"`
70-
StrictNames string `flag:"strict-names"` // PG 9.6, 10 & 11 only
70+
StrictNames string `flag:"strict-names"` // PG 9.6+
7171
UseSetSessionAuthorization bool `flag:"use-set-session-authorization"`
7272
Role string `flag:"role"`
7373
}
@@ -95,10 +95,10 @@ type pgDumpAllOptions struct {
9595
LockWaitTimeout string `flag:"lock-wait-timeout"`
9696
LoadViaPartitionRoot bool `flag:"load-via-partition-root"`
9797
NoComments bool `flag:"no-comments"`
98-
NoPublications bool `flag:"no-publications"` // PG 10 & 11 only
98+
NoPublications bool `flag:"no-publications"` // PG 10+
9999
NoRolePasswords bool `flag:"no-role-passwords"`
100100
NoSecurityLabels bool `flag:"no-security-labels"`
101-
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10 & 11 only
101+
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10+
102102
NoSync bool `flag:"no-sync"`
103103
NoTableSpaces bool `flag:"no-tablespaces"`
104104
NoUnloggedTableData bool `flag:"no-unlogged-table-data"`
@@ -136,12 +136,12 @@ type pgRestoreOptions struct {
136136
IfExists bool `flag:"if-exists"`
137137
NoComments bool `flag:"no-comments"`
138138
NoDataForFailedTables bool `flag:"no-data-for-failed-tables"`
139-
NoPublications bool `flag:"no-publications"` // PG 10 & 11 only
139+
NoPublications bool `flag:"no-publications"` // PG 10+
140140
NoSecurityLabels bool `flag:"no-security-labels"`
141-
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10 & 11 only
141+
NoSubscriptions bool `flag:"no-subscriptions"` // PG 10+
142142
NoTableSpaces bool `flag:"no-tablespaces"`
143143
Section []string `flag:"section"`
144-
StrictNames string `flag:"strict-names"` // PG 9.6, 10 & 11 only
144+
StrictNames string `flag:"strict-names"` // PG 9.6+
145145
UseSetSessionAuthorization bool `flag:"use-set-session-authorization"`
146146
Role string `flag:"role"`
147147
}

bin/postgres-operator/runpsql.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash
22

33
# Copyright 2019 Crunchy Data Solutions, Inc.
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,12 +16,12 @@
1616
#echo $1 is the password
1717
#echo $2 is the host ip
1818

19-
SLEEP_TIME=2
19+
SLEEP_TIME=2
2020
FAILURES=0
2121
MAX_FAILURES=7
2222
while true; do
2323
sleep $SLEEP_TIME
24-
/usr/pgsql-11/bin/pg_isready --dbname=postgres --host=$2 --port=5432 --username=postgres
24+
/usr/pgsql-12/bin/pg_isready --dbname=postgres --host=$2 --port=5432 --username=postgres
2525
if [ $? -eq 0 ]
2626
then
2727
echo "Successfully reached master @ " `date`

centos7/Dockerfile.pgo-apiserver.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LABEL Vendor="Crunchy Data Solutions" \
88
summary="Crunchy Data PostgreSQL Operator - Apiserver" \
99
description="Crunchy Data PostgreSQL Operator - Apiserver"
1010

11-
ENV PGVERSION="11" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm"
11+
ENV PGVERSION="12" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm"
1212

1313
COPY redhat/licenses /licenses
1414
COPY licenses /licenses
@@ -17,7 +17,7 @@ COPY licenses /licenses
1717

1818
RUN rpm -Uvh https://download.postgresql.org/pub/repos/yum/${PGVERSION}/redhat/rhel-7-x86_64/${PGDG_REPO}
1919

20-
RUN yum -y update && yum -y install postgresql11 hostname && yum -y clean all
20+
RUN yum -y update && yum -y install postgresql12 hostname && yum -y clean all
2121

2222
ADD bin/apiserver /usr/local/bin
2323
ADD bin/postgres-operator/runpsql.sh /usr/local/bin

centos7/Dockerfile.pgo-backrest-repo.centos7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LABEL Vendor="Crunchy Data Solutions" \
88
summary="Crunchy Data PostgreSQL Operator - Apiserver" \
99
description="Crunchy Data PostgreSQL Operator - Apiserver"
1010

11-
ENV PGVERSION="11" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg11"\
11+
ENV PGVERSION="12" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg12"\
1212
BACKREST_VERSION="2.18"
1313

1414
COPY redhat/licenses /licenses

centos7/Dockerfile.pgo-backrest-restore.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LABEL Vendor="Crunchy Data Solutions" \
88
summary="Crunchy Data PostgreSQL Operator - pgBackRest" \
99
description="pgBackRest image that is integrated for use with Crunchy Data's PostgreSQL Operator."
1010

11-
ENV PGVERSION="11" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg11" \
11+
ENV PGVERSION="12" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg12" \
1212
BACKREST_VERSION="2.18"
1313

1414
COPY redhat/licenses /licenses
@@ -17,7 +17,7 @@ COPY licenses /licenses
1717
RUN rpm -Uvh https://download.postgresql.org/pub/repos/yum/${PGVERSION}/redhat/rhel-7-x86_64/${PGDG_REPO}
1818

1919
RUN yum -y update && yum -y install --disablerepo="${PGDG_REPO_DISABLE}" --enablerepo="${PGDG_REPO_ENABLE}" \
20-
psmisc openssh-server openssh-clients pgbackrest-"${BACKREST_VERSION}" postgresql11-server procps-ng && yum -y clean all
20+
psmisc openssh-server openssh-clients pgbackrest-"${BACKREST_VERSION}" postgresql12-server procps-ng && yum -y clean all
2121

2222
RUN mkdir -p /opt/cpm/bin /pgdata && chown -R 26:26 /opt/cpm
2323
ADD bin/pgo-backrest-restore/ /opt/cpm/bin

centos7/Dockerfile.pgo-backrest.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LABEL Vendor="Crunchy Data Solutions" \
88
summary="Crunchy Data PostgreSQL Operator - pgBackRest" \
99
description="pgBackRest image that is integrated for use with Crunchy Data's PostgreSQL Operator."
1010

11-
ENV PGVERSION="11" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg11" \
11+
ENV PGVERSION="12" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm" PGDG_REPO_DISABLE="pgdg*" PGDG_REPO_ENABLE="pgdg12" \
1212
BACKREST_VERSION="2.18"
1313

1414
COPY redhat/licenses /licenses
@@ -21,7 +21,7 @@ RUN yum -y update && \
2121
--disablerepo="${PGDG_REPO_DISABLE}" \
2222
--enablerepo="${PGDG_REPO_ENABLE}" \
2323
--setopt=skip_missing_names_on_install=False \
24-
postgresql11-server \
24+
postgresql12-server \
2525
pgbackrest-"${BACKREST_VERSION}" \
2626
&& yum -y clean all
2727

centos7/Dockerfile.pgo-load.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LABEL name="crunchydata/pgo-load" \
1414
io.openshift.expose-services="" \
1515
io.openshift.tags="crunchy,database"
1616

17-
ENV PGVERSION="11" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm"
17+
ENV PGVERSION="12" PGDG_REPO="pgdg-redhat-repo-latest.noarch.rpm"
1818

1919
COPY redhat/licenses /licenses
2020
COPY licenses /licenses
@@ -29,7 +29,7 @@ RUN yum -y update && yum -y install epel-release \
2929
nss_wrapper \
3030
openssh-clients \
3131
procps-ng \
32-
&& yum -y install postgresql11 \
32+
&& yum -y install postgresql12 \
3333
&& yum clean all -y
3434

3535
RUN mkdir -p /opt/cpm/bin /opt/cpm/conf

centos7/Dockerfile.pgo-sqlrunner.centos7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN yum -y update \
2222
hostname \
2323
nss_wrapper \
2424
procps-ng \
25-
&& yum -y install postgresql11 \
25+
&& yum -y install postgresql12 \
2626
&& yum clean all -y
2727

2828
RUN mkdir -p /opt/cpm/bin /opt/cpm/conf /pgconf \

centos7/Dockerfile.postgres-operator.centos7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ COPY licenses /licenses
1616
# PGDG PostgreSQL Repository
1717
RUN rpm -Uvh https://download.postgresql.org/pub/repos/yum/${PGVERSION}/redhat/rhel-7-x86_64/${PGDG_REPO}
1818

19-
RUN yum -y update && yum -y install hostname postgresql11 && yum -y clean all
19+
RUN yum -y update && yum -y install hostname postgresql12 && yum -y clean all
2020

2121
ADD bin/postgres-operator /usr/local/bin
2222
ADD conf/postgres-operator /default-pgo-config

examples/custom-config-ssl/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
This example shows how you can configure PostgreSQL to use SSL for client authentication.
55

6-
The example requires SSL certificates and keys to be created. Included in the examples directory is the script called by create.sh to create self-signed certificates (server and client) for the example:
6+
The example requires SSL certificates and keys to be created. Included in the examples directory is the script called by create.sh to create self-signed certificates (server and client) for the example:
77

8-
$PGOROOT/examples/ssl-creator.sh.
8+
$PGOROOT/examples/ssl-creator.sh.
99

1010
Additionally, this script requires the certstrap utility to be installed. An install script is provided to install the correct version for the example if not already installed.
1111

@@ -48,7 +48,7 @@ home/pgo/odev/src/github.com/crunchydata/postgres-operator/examples/custom-confi
4848

4949
You should see a connection that looks like the following:
5050

51-
psql (11.5)
51+
psql (12.1)
5252
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
5353
Type "help" for help.
5454

0 commit comments

Comments
 (0)