Skip to content

Commit 60e5b6f

Browse files
authored
Merge branch 'develop' into sam/oriole-beta9
2 parents 15b7bd3 + f9bb095 commit 60e5b6f

32 files changed

+7537
-1590
lines changed

.github/workflows/nix-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jobs:
2424
arch: arm64
2525
- runner: macos-latest
2626
arch: arm64
27-
- runner: macos-13
28-
arch: amd64
2927
runs-on: ${{ matrix.runner }}
3028
timeout-minutes: 180
3129
steps:

ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ do $$
22
declare
33
extoid oid := (select oid from pg_extension where extname = 'pgmq');
44
r record;
5+
cls pg_class%rowtype;
56
begin
7+
68
set local search_path = '';
79

810
/*
@@ -136,15 +138,36 @@ alter extension pgmq add function pgmq.drop_queue;
136138

137139

138140
update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq';
141+
139142
for r in (select * from pg_depend where refobjid = extoid) loop
143+
144+
140145
if r.classid = 'pg_type'::regclass then
141-
execute(format('alter type %s owner to postgres;', r.objid::regtype));
146+
147+
-- store the type's relkind
148+
select * into cls from pg_class c where c.reltype = r.objid;
149+
150+
if r.objid::regtype::text like '%[]' then
151+
-- do nothing (skipping array type)
152+
153+
elsif cls.relkind in ('r', 'p', 'f', 'm') then
154+
-- table-like objects (regular table, partitioned, foreign, materialized view)
155+
execute format('alter table pgmq.%I owner to postgres;', cls.relname);
156+
157+
else
158+
execute(format('alter type %s owner to postgres;', r.objid::regtype));
159+
160+
end if;
161+
142162
elsif r.classid = 'pg_proc'::regclass then
143163
execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid)));
164+
144165
elsif r.classid = 'pg_class'::regclass then
145166
execute(format('alter table %s owner to postgres;', r.objid::regclass));
167+
146168
else
147169
raise exception 'error on pgmq after-create script: unexpected object type %', r.classid;
170+
148171
end if;
149172
end loop;
150173
end $$;

ansible/tasks/test-image.yml

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
- name: Remove specified extensions from SQL file
6868
ansible.builtin.command:
6969
cmd: >
70-
sed -i '/\\ir.*\(timescaledb\|postgis\|pgrouting\|plv8\|pg_jsonschema\|pg_graphql\).*\.sql/d' /tmp/migrations/tests/extensions/test.sql
70+
sed -i '/\\ir.*\(timescaledb\|postgis\|pgrouting\|plv8\).*\.sql/d' /tmp/migrations/tests/extensions/test.sql
7171
when: is_psql_oriole
7272
become: yes
7373

@@ -76,11 +76,9 @@
7676
paths: /tmp/migrations/tests/extensions
7777
patterns:
7878
- '*timescaledb*.sql'
79+
- '*plv8*.sql'
7980
- '*postgis*.sql'
8081
- '*pgrouting*.sql'
81-
- '*plv8*.sql'
82-
- '*pg_jsonschema*.sql'
83-
- '*pg_graphql*.sql'
8482
register: files_to_remove
8583
when: is_psql_oriole
8684

@@ -91,29 +89,6 @@
9189
loop: "{{ files_to_remove.files }}"
9290
when: is_psql_oriole
9391
become: yes
94-
95-
- name: Remove specified extensions from SQL file
96-
ansible.builtin.command:
97-
cmd: >
98-
sed -i "/'pg_graphql',/d" /tmp/unit-tests/unit-test-01.sql
99-
when: is_psql_oriole
100-
become: yes
101-
102-
- name: Remove graphql schema test
103-
lineinfile:
104-
path: /tmp/migrations/tests/database/exists.sql
105-
regexp: "^SELECT has_schema\\('graphql'\\);$"
106-
state: absent
107-
become: yes
108-
when: is_psql_oriole
109-
110-
- name: Remove graphql schema test
111-
lineinfile:
112-
path: /tmp/migrations/tests/database/exists.sql
113-
regexp: "^SELECT has_schema\\('graphql_public'\\);$"
114-
state: absent
115-
become: yes
116-
when: is_psql_oriole
11792

11893
- name: Run Unit tests (with filename unit-test-*) on Postgres Database
11994
shell: /usr/bin/pg_prove -U postgres -h localhost -d postgres -v /tmp/unit-tests/unit-test-*.sql

ansible/vars.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ async_mode: true
44

55
postgres_major:
66
- "15"
7-
- "16"
87
- "orioledb-17"
98

109
# Full version strings for each major version
1110
postgres_release:
12-
postgresorioledb-17: "17.0.1.018-orioledb"
13-
postgres15: "15.8.1.028"
14-
postgres16: "16.3.1.034"
11+
postgresorioledb-17: "17.0.1.019-orioledb"
12+
postgres15: "15.8.1.029"
1513

1614
# Non Postgres Extensions
1715
pgbouncer_release: "1.19.0"

docker/nix/build_nix.sh

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,21 @@ fi
99
SYSTEM=$(nix-instantiate --eval -E builtins.currentSystem | tr -d '"')
1010

1111
nix build .#checks.$SYSTEM.psql_15 -L --no-link
12-
nix build .#checks.$SYSTEM.psql_16 -L --no-link
13-
12+
nix build .#checks.$SYSTEM.psql_orioledb-17 -L --no-link
1413
nix build .#psql_15/bin -o psql_15
15-
nix build .#psql_16/bin -o psql_16
1614

17-
# Skip orioledb-17 on x86_64-darwin
18-
if [ "$SYSTEM" != "x86_64-darwin" ]; then
19-
nix build .#psql_orioledb-17/bin -o psql_orioledb_17
20-
fi
15+
nix build .#psql_orioledb-17/bin -o psql_orioledb_17
2116

2217
# Copy to S3
2318
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_15
24-
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_16
25-
if [ "$SYSTEM" != "x86_64-darwin" ]; then
26-
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_orioledb_17
27-
fi
19+
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_orioledb_17
2820
if [ "$SYSTEM" = "aarch64-linux" ]; then
2921
nix build .#postgresql_15_debug -o ./postgresql_15_debug
3022
nix build .#postgresql_15_src -o ./postgresql_15_src
31-
nix build .#postgresql_16_debug -o ./postgresql_16_debug
32-
nix build .#postgresql_16_src -o ./postgresql_16_src
3323
nix build .#postgresql_orioledb-17_debug -o ./postgresql_orioledb-17_debug
3424
nix build .#postgresql_orioledb-17_src -o ./postgresql_orioledb-17_src
3525
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_debug-debug
3626
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_src
37-
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_16_debug-debug
38-
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_16_src
3927
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_debug-debug
4028
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_src
4129
fi

0 commit comments

Comments
 (0)