Skip to content

Commit dfb08c3

Browse files
authored
K8SPG-254 in PG16.3 percona-pgbackrest rpm creats postgres user (percona#979)
1 parent 8b21fd9 commit dfb08c3

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

postgresql-containers/build/pgbackrest-repo/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,15 @@ COPY --from=go_builder /licenses /licenses
111111
COPY bin/common /opt/crunchy/bin
112112
COPY bin/pgbackrest-common /opt/crunchy/bin
113113

114+
# only PG16 is affected PG-794
115+
RUN if [[ "${PG_MAJOR//.}" -le '15' ]]; then \
116+
groupadd postgres -g 26; \
117+
useradd postgres -u 26 -g 26; \
118+
else \
119+
usermod -d /home/postgres postgres; \
120+
fi
121+
114122
RUN set -ex; \
115-
groupadd postgres -g 26; \
116-
useradd postgres -u 26 -g 26; \
117123
groupadd pgbackrest -g 2000; \
118124
useradd pgbackrest -u 2000 -g 2000
119125

postgresql-containers/build/pgbackrest/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ RUN set -ex; \
102102
percona-pgbackrest; \
103103
microdnf -y clean all
104104

105-
RUN set -ex; \
106-
groupadd postgres -g 26; \
107-
useradd postgres -u 26 -g 26
105+
# only PG16 is affected PG-794
106+
RUN if [[ "${PG_MAJOR//.}" -le '15' ]]; then \
107+
groupadd postgres -g 26; \
108+
useradd postgres -u 26 -g 26; \
109+
else \
110+
usermod -d /home/postgres postgres; \
111+
fi
108112

109113
RUN set -ex; \
110114
mkdir -p /opt/crunchy/bin /opt/crunchy/conf /pgdata /backrestrepo \

0 commit comments

Comments
 (0)