Skip to content

Commit c45336c

Browse files
pcncsoedirgokangmingtaydragarciahf
authored
chore: merge 15.6 changes into develop (#1368)
* fix: account for `public` grantee * fix(ci): respect postgresVersion input (#1237) * feat: bump gotrue version to v2.162.0 (#1241) * fix: only grant pg_read_all_data if it exists (#1242) * fix: only grant pg_read_all_data if it exists * fix: prevent `public` from being casted into `regrole` * fix(15.6): account for pg_stat_monitor major version upgrade (#1247) * chore: release updates to run physical backup as a service to 15.6 image (#1248) * chore: updates to run physical backups as a service (#1235) * chore: init commence-backup service * chore: bump adminapi and adminmgr * chore: bump version * fix: provide correct filename * chore: bump postgres version * fix(15.6/pg_upgrade): retry commands within the cleanup step; wait until PG is ready to accept connections (#1250) * fix(15.6/upgrades): collision when patching wrappers lib locations for upgrades (#1252) * feat: bump auth 2.162.1 on 15.6 (#1256) * fix(15.6): disable pg_stat_monitor (#1260) * fix: disable pg_stat_monitor * chore: bump version * fix(15.6): disable pg_stat_monitor (#1262) * fix: disable pg_stat_monitor * chore: bump version * feat: bump gotrue to v2.162.2 (#1264) * chore: add timescaledb 2.9.1; wrappers upgrade fix; wrappers & plv8 naming fix (#1259) Co-authored-by: Bobbie Soedirgo <[email protected]> Co-authored-by: Bobbie Soedirgo <[email protected]> Co-authored-by: Kang Ming <[email protected]> Co-authored-by: Stojan Dimitrovski <[email protected]> Co-authored-by: Sam Rose <[email protected]> fix(ci): respect postgresVersion input (#1237) fix: only grant pg_read_all_data if it exists (#1242) fix(15.6): disable pg_stat_monitor (#1260) * chore(15.6): bump pg version (#1273) * feat: bump auth to v2.163.0 on 15.6 (#1275) * fix: restart PG during pre-upgrade steps to shed hanging connections (#1271) * fix(upgrades): wrappers 4.2.0 -> wrappers 4.2.0 (#1278) * fix: handle supabase_admin authenticator membership snowflake * feat: add auth v2.163.1 to 15.6 (#1283) * feat: bump gotrue to v2.163.2 (#1287) * pg_net 0.11 on 15.6 release branch (#1290) * bump pg_net to 0.11.0 * bump image to 15.6.1.135 * fix: don't copy custom extension scripts during pg_upgrade (#1291) * fix: add recursive flag to custom extension script directory delete (#1292) * [GEN-11027] chore: reserve a fixed amount of blocks for the data volume; remove ansible pkg + ppa (#1295) * fix: grant predefined roles post-upgrade * fix: add more roles to reserved_roles & reserved_memberships (#1303) * fix: add more roles to reserved_roles & reserved_memberships * Update common-nix.vars.pkr.hcl * feat: update envoy lds config with auth jwks, oidc URLs, strip `sb-opk` header (#1296) * chore: udpate package repo for salt (#1307) * fix: use sudo for apt-get commands * Update pg net to 0.13.0 on pg 15.6 branch (#1315) * upgrade pg_net to 0.13.0 on 15.6 * bump postgres-version * chore: cleanup pgbouncer.get_auth ownership accordingly * chore: standardize * Upgrade pgvector to 0.8.0 * Update common-nix.vars.pkr.hcl Bump version to 15.6.1.140 * feat: upgrade to auth v2.164.0 (#1329) * fix: update auth to v2.164.0 * fix: upgrade version * fix: bump nix instead * fix: replace `alter routine` with `alter function|procedure` (#1333) * fix: pg_upgrade_script (#1336) * feat: supautils v2.5.0 * pgmq in 15.6 image (#1337) * pick pgmq to 15.6 * update extension interface test output * bump image version * fix: upload gotrue binary to internal-artifacts as a gz file (#1340) * feat: upgrade to auth v2.165.0 (#1357) Upgrade Auth version to v2.165.0 supabase/auth#1846 Co-authored-by: Chris Stockton <[email protected]> * feat: bump gotrue to v2.165.1 (#1358) * feat: build and cache debug and src on this branch (#1360) * fix: pgmq ownership (#1362) * fix: pgmq ownership * tmp * bump version for production release --------- Co-authored-by: Oliver Rice <[email protected]> * fix: remove duplicate pgmq in test * chore: filter timescale 2.9.1 on pg 16 and oriole17 * chore: bumping versions (#1370) --------- Co-authored-by: Bobbie Soedirgo <[email protected]> Co-authored-by: Bobbie Soedirgo <[email protected]> Co-authored-by: Kang Ming <[email protected]> Co-authored-by: angelico <[email protected]> Co-authored-by: Stojan Dimitrovski <[email protected]> Co-authored-by: Sam Rose <[email protected]> Co-authored-by: Oliver Rice <[email protected]> Co-authored-by: Pavel Borisov <[email protected]> Co-authored-by: Pavel Borisov <[email protected]> Co-authored-by: Joel Lee <[email protected]> Co-authored-by: Chris Stockton <[email protected]> Co-authored-by: Chris Stockton <[email protected]>
1 parent 6468741 commit c45336c

File tree

8 files changed

+44
-31
lines changed

8 files changed

+44
-31
lines changed

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ARG hypopg_release=1.3.1
3636
ARG pgvector_release=0.4.0
3737
ARG pg_tle_release=1.3.2
3838
ARG index_advisor_release=0.2.0
39-
ARG supautils_release=2.2.1
39+
ARG supautils_release=2.5.0
4040
ARG wal_g_release=2.0.1
4141

4242
####################

Diff for: ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,10 @@ begin
456456
foreach obj in array functions
457457
loop
458458
if obj->>'owner' = 'postgres' then
459-
execute(format('alter routine %s(%s) owner to postgres;', (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
459+
execute(format('alter %s %s(%s) owner to postgres;'
460+
, case when obj->>'kind' = 'p' then 'procedure' else 'function' end
461+
, (obj->>'oid')::regproc
462+
, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
460463
end if;
461464
for rec in
462465
select grantor, grantee, privilege_type, is_grantable
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
do $$
2+
declare
3+
extoid oid := (select oid from pg_extension where extname = 'pgmq');
4+
r record;
5+
begin
6+
set local search_path = '';
7+
update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq';
8+
for r in (select * from pg_depend where refobjid = extoid) loop
9+
if r.classid = 'pg_type'::regclass then
10+
execute(format('alter type %s owner to postgres;', r.objid::regtype));
11+
elsif r.classid = 'pg_proc'::regclass then
12+
execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid)));
13+
elsif r.classid = 'pg_class'::regclass then
14+
execute(format('alter table %s owner to postgres;', r.objid::regclass));
15+
else
16+
raise exception 'error on pgmq after-create script: unexpected object type %', r.classid;
17+
end if;
18+
end loop;
19+
end $$;

Diff for: ansible/manifest-playbook.yml

+2-18
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,10 @@
1818
- name: gotrue - download commit archive
1919
get_url:
2020
url: "https://github.com/supabase/gotrue/releases/download/v{{ gotrue_release }}/auth-v{{ gotrue_release }}-arm64.tar.gz"
21-
dest: /tmp/gotrue.tar.gz
21+
dest: /tmp/auth-v{{ gotrue_release }}-arm64.tar.gz
2222
checksum: "{{ gotrue_release_checksum }}"
2323
timeout: 60
2424

25-
- name: gotrue - create /tmp/gotrue
26-
file:
27-
path: /tmp/gotrue
28-
state: directory
29-
mode: 0775
30-
31-
- name: gotrue - unpack archive in /tmp/gotrue
32-
unarchive:
33-
remote_src: yes
34-
src: /tmp/gotrue.tar.gz
35-
dest: /tmp/gotrue
36-
37-
- name: gotrue - pack archive
38-
shell: |
39-
cd /tmp && tar -cJf gotrue-v{{ gotrue_release }}-arm64.tar.xz gotrue
40-
4125
- name: PostgREST - download ubuntu binary archive (arm)
4226
get_url:
4327
url: "https://github.com/PostgREST/postgrest/releases/download/v{{ postgrest_release }}/postgrest-v{{ postgrest_release }}-ubuntu-aarch64.tar.xz"
@@ -82,7 +66,7 @@
8266
aws s3 cp /tmp/{{ item.file }} s3://{{ internal_artifacts_bucket }}/upgrades/{{ item.service }}/{{ item.file }}
8367
with_items:
8468
- service: gotrue
85-
file: gotrue-v{{ gotrue_release }}-arm64.tar.xz
69+
file: auth-v{{ gotrue_release }}-arm64.tar.gz
8670
- service: postgrest
8771
file: postgrest-{{ postgrest_release }}-arm64.tar.xz
8872
- service: supabase-admin-api

Diff for: ansible/vars.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.0.1.007-orioledb"
13-
postgres15: "15.8.1.017"
14-
postgres16: "16.3.1.023"
12+
postgresorioledb-17: "17.0.1.008-orioledb"
13+
postgres15: "15.8.1.018"
14+
postgres16: "16.3.1.024"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"
@@ -92,10 +92,10 @@ timescaledb_release_checksum: sha256:883638f2e79d25ec88ee58f603f3c81c999b6364cb4
9292
wal2json_release: "2_5"
9393
wal2json_release_checksum: sha256:b516653575541cf221b99cf3f8be9b6821f6dbcfc125675c85f35090f824f00e
9494

95-
supautils_release: "2.2.1"
96-
supautils_release_arm64_deb_checksum: sha256:1a2d2b8fe604d38921ed9cf3a0d56dd142a274035d0dca17ad21cdc81ddd9569
97-
supautils_release_amd64_deb_checksum: sha256:4674fac146976dc179f5871271830718112f5eaa853bc461df9e303c8df2e1ab
98-
supautils_release_tar_checksum: sha256:f1f33371390322ac830645b8b0b8e249cb8ca10b19fdeae917f383014ed01b5d
95+
supautils_release: "2.5.0"
96+
supautils_release_arm64_deb_checksum: sha256:406e4a816f719bd6c4b2143e9bb38078fbe60d7e85018ec0aed5d76924e28000
97+
supautils_release_amd64_deb_checksum: sha256:71f182b478d8aaf167609dd382875cdce3fbe992e888988b3d51cdad39e08202
98+
supautils_release_tar_checksum: sha256:07c41244e4374248da9c2df2822152f3ae8f1e74c8a92d361300480193219b63
9999

100100
pljava_release: master
101101
pljava_release_checksum: sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6

Diff for: docker/orioledb/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ARG hypopg_release=1.3.1
3636
ARG pgvector_release=0.4.0
3737
ARG pg_tle_release=1.3.2
3838
ARG index_advisor_release=0.2.0
39-
ARG supautils_release=2.2.1
39+
ARG supautils_release=2.5.0
4040
ARG wal_g_release=2.0.1
4141

4242
####################

Diff for: flake.nix

+9-2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
ourExtensions = [
109109
./nix/ext/rum.nix
110110
./nix/ext/timescaledb.nix
111+
./nix/ext/timescaledb-2.9.1.nix
111112
./nix/ext/pgroonga.nix
112113
./nix/ext/index_advisor.nix
113114
./nix/ext/wal2json.nix
@@ -144,7 +145,8 @@
144145
#we're not using timescaledb in the orioledb version of supabase extensions
145146
orioleFilteredExtensions = builtins.filter (
146147
x:
147-
x != ./nix/ext/timescaledb.nix &&
148+
x != ./nix/ext/timescaledb.nix &&
149+
x != ./nix/ext/timescaledb-2.9.1.nix &&
148150
x != ./nix/ext/plv8.nix &&
149151
x != ./nix/ext/postgis.nix &&
150152
x != ./nix/ext/pgrouting.nix &&
@@ -153,7 +155,10 @@
153155
) ourExtensions;
154156

155157
orioledbExtensions = orioleFilteredExtensions ++ [ ./nix/ext/orioledb.nix ];
156-
158+
pg16Extensions = builtins.filter (
159+
x:
160+
x != ./nix/ext/timescaledb-2.9.1.nix
161+
) ourExtensions;
157162
getPostgresqlPackage = version:
158163
pkgs.postgresql."postgresql_${version}";
159164
# Create a 'receipt' file for a given postgresql package. This is a way
@@ -197,6 +202,8 @@
197202
postgresql = getPostgresqlPackage version;
198203
extensionsToUse = if (builtins.elem version ["orioledb-16" "orioledb-17"])
199204
then orioledbExtensions
205+
else if version == "16"
206+
then pg16Extensions
200207
else ourExtensions;
201208
in map (path: pkgs.callPackage path { inherit postgresql; }) extensionsToUse;
202209

Diff for: nix/tests/prime.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ create extension pg_graphql;
4343
create extension pg_freespacemap;
4444
create extension pg_hashids;
4545
create extension pg_prewarm;
46+
create extension pgmq;
4647
create extension pg_jsonschema;
4748
create extension pg_repack;
4849
create extension pg_stat_monitor;
@@ -54,7 +55,6 @@ create extension pg_visibility;
5455
create extension pg_walinspect;
5556
create extension pgaudit;
5657
create extension pgcrypto;
57-
create extension pgmq;
5858
create extension pgtap;
5959
create extension pgjwt;
6060
create extension pgroonga;

0 commit comments

Comments
 (0)