Skip to content

Commit aaea068

Browse files
Upgrade the internal PostgreSQL to 14 in 2.9.0 (#18612)
Fix #18338 Signed-off-by: Yang Jiao <[email protected]> Co-authored-by: Wang Yan <[email protected]>
1 parent 0a3509f commit aaea068

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

make/photon/db/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY ./make/photon/db/initial-registry.sql /docker-entrypoint-initdb.d/
1414
RUN chown -R postgres:postgres /docker-entrypoint.sh /docker-healthcheck.sh /docker-entrypoint-initdb.d \
1515
&& chmod u+x /docker-entrypoint.sh /docker-healthcheck.sh
1616

17-
ENTRYPOINT ["/docker-entrypoint.sh", "", "13"]
17+
ENTRYPOINT ["/docker-entrypoint.sh", "13", "14"]
1818
HEALTHCHECK CMD ["/docker-healthcheck.sh"]
1919

20-
USER postgres
20+
USER postgres

make/photon/db/Dockerfile.base

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ FROM photon:4.0
22

33
ENV PGDATA /var/lib/postgresql/data
44

5-
RUN tdnf install -y shadow gzip postgresql13 findutils bc >> /dev/null \
5+
RUN tdnf install -y shadow gzip postgresql13 postgresql findutils bc >> /dev/null \
66
&& groupadd -r postgres --gid=999 \
77
&& useradd -m -r -g postgres --uid=999 postgres \
88
&& mkdir -p /docker-entrypoint-initdb.d \
99
&& mkdir -p /run/postgresql \
1010
&& chown -R postgres:postgres /run/postgresql \
1111
&& chmod 2777 /run/postgresql \
1212
&& mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA" \
13-
&& sed -i "s|#listen_addresses = 'localhost'.*|listen_addresses = '*'|g" /usr/pgsql/13/share/postgresql/postgresql.conf.sample \
14-
&& sed -i "s|#unix_socket_directories = '/tmp'.*|unix_socket_directories = '/run/postgresql'|g" /usr/pgsql/13/share/postgresql/postgresql.conf.sample \
13+
&& sed -i "s|#listen_addresses = 'localhost'.*|listen_addresses = '*'|g" /usr/share/postgresql/postgresql.conf.sample \
14+
&& sed -i "s|#unix_socket_directories = '/tmp'.*|unix_socket_directories = '/run/postgresql'|g" /usr/share/postgresql/postgresql.conf.sample \
1515
&& tdnf clean all
1616

1717
RUN tdnf erase -y toybox && tdnf install -y util-linux net-tools

make/photon/db/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PGDATANEW=${PGDATA}/pg${PG_VERSION_NEW}
1414

1515
# We should block the upgrade path from 9.6 directly.
1616
if [ -s $PGDATA/PG_VERSION ]; then
17-
echo "Upgrading from PostgreSQL 9.6 to PostgreSQL $PG_VERSION_NEW is not supported in the current Harbor release."
17+
echo "Upgrading from PostgreSQL 9.6 to PostgreSQL $PG_VERSION_NEW is not supported in the current Harbor release."
1818
echo "You should upgrade to previous Harbor firstly, then upgrade to current release."
1919
exit 1
2020
fi
@@ -56,7 +56,7 @@ if [ ! -s $PGDATANEW/PG_VERSION ]; then
5656
rm -rf $PGDATAOLD
5757
else
5858
echo "init DB, DB version:$PG_VERSION_NEW"
59-
initPG $PGDATANEW true
59+
initPG $PGDATANEW true
6060
fi
6161
fi
6262

0 commit comments

Comments
 (0)