Skip to content

Commit bc98e96

Browse files
committed
Bump PG versions to 17.5, 16.9, 15.13 (#7986)
Nontrivial bump because of the following PG15.3 commit 317aba70e postgres/postgres@317aba70e Previously, when views were converted to RTE_SUBQUERY the relid would be cleared in PG15. In this patch of PG15, relid is retained. Therefore, we add a check with the "relkind and rtekind" to identify the converted views in 15.13 Sister PR citusdata/the-process#164 Using dev image sha because I encountered the libpq symlink issue again with "-v219b87c"
1 parent 1cb2462 commit bc98e96

3 files changed

Lines changed: 22 additions & 10 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ USER citus
7373

7474
# build postgres versions separately for effective parrallelism and caching of already built versions when changing only certain versions
7575
FROM base AS pg15
76-
RUN MAKEFLAGS="-j $(nproc)" pgenv build 15.12
76+
RUN MAKEFLAGS="-j $(nproc)" pgenv build 15.13
7777
RUN rm .pgenv/src/*.tar*
7878
RUN make -C .pgenv/src/postgresql-*/ clean
7979
RUN make -C .pgenv/src/postgresql-*/src/include install
@@ -85,7 +85,7 @@ RUN cp -r .pgenv/src .pgenv/pgsql-* .pgenv/config .pgenv-staging/
8585
RUN rm .pgenv-staging/config/default.conf
8686

8787
FROM base AS pg16
88-
RUN MAKEFLAGS="-j $(nproc)" pgenv build 16.8
88+
RUN MAKEFLAGS="-j $(nproc)" pgenv build 16.9
8989
RUN rm .pgenv/src/*.tar*
9090
RUN make -C .pgenv/src/postgresql-*/ clean
9191
RUN make -C .pgenv/src/postgresql-*/src/include install
@@ -97,7 +97,7 @@ RUN cp -r .pgenv/src .pgenv/pgsql-* .pgenv/config .pgenv-staging/
9797
RUN rm .pgenv-staging/config/default.conf
9898

9999
FROM base AS pg17
100-
RUN MAKEFLAGS="-j $(nproc)" pgenv build 17.4
100+
RUN MAKEFLAGS="-j $(nproc)" pgenv build 17.5
101101
RUN rm .pgenv/src/*.tar*
102102
RUN make -C .pgenv/src/postgresql-*/ clean
103103
RUN make -C .pgenv/src/postgresql-*/src/include install
@@ -216,7 +216,7 @@ COPY --chown=citus:citus .psqlrc .
216216
RUN sudo chown --from=root:root citus:citus -R ~
217217

218218
# sets default pg version
219-
RUN pgenv switch 17.4
219+
RUN pgenv switch 17.5
220220

221221
# make connecting to the coordinator easy
222222
ENV PGPORT=9700

.github/workflows/build_and_test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
pgupgrade_image_name: "ghcr.io/citusdata/pgupgradetester"
3232
style_checker_image_name: "ghcr.io/citusdata/stylechecker"
3333
style_checker_tools_version: "0.8.18"
34-
sql_snapshot_pg_version: "17.4"
35-
image_suffix: "-veab367a"
36-
pg15_version: '{ "major": "15", "full": "15.12" }'
37-
pg16_version: '{ "major": "16", "full": "16.8" }'
38-
pg17_version: '{ "major": "17", "full": "17.4" }'
39-
upgrade_pg_versions: "15.12-16.8-17.4"
34+
sql_snapshot_pg_version: "17.5"
35+
image_suffix: "-dev-d28f316"
36+
pg15_version: '{ "major": "15", "full": "15.13" }'
37+
pg16_version: '{ "major": "16", "full": "16.9" }'
38+
pg17_version: '{ "major": "17", "full": "17.5" }'
39+
upgrade_pg_versions: "15.13-16.9-17.5"
4040
steps:
4141
# Since GHA jobs need at least one step we use a noop step here.
4242
- name: Set up parameters

src/backend/distributed/planner/multi_router_planner.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,18 @@ SelectsFromDistributedTable(List *rangeTableList, Query *query)
22452245
continue;
22462246
}
22472247

2248+
#if PG_VERSION_NUM >= 150013 && PG_VERSION_NUM < PG_VERSION_16
2249+
if (rangeTableEntry->rtekind == RTE_SUBQUERY && rangeTableEntry->relkind == 0)
2250+
{
2251+
/*
2252+
* In PG15.13 commit https://github.com/postgres/postgres/commit/317aba70e
2253+
* relid is retained when converting views to subqueries,
2254+
* so we need an extra check identifying those views
2255+
*/
2256+
continue;
2257+
}
2258+
#endif
2259+
22482260
if (rangeTableEntry->relkind == RELKIND_VIEW ||
22492261
rangeTableEntry->relkind == RELKIND_MATVIEW)
22502262
{

0 commit comments

Comments
 (0)